From b570e08a745a9733a8f3754aff70135d06fb5a76 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sun, 28 Apr 2019 16:36:13 +0200 Subject: [PATCH] fix acl template --- templates/etc/mosquitto/aclfile.j2 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/etc/mosquitto/aclfile.j2 b/templates/etc/mosquitto/aclfile.j2 index ff72c57..13b1877 100644 --- a/templates/etc/mosquitto/aclfile.j2 +++ b/templates/etc/mosquitto/aclfile.j2 @@ -1,10 +1,10 @@ # {{ ansible_managed }} -{% for dict in mosquitto_acl %} -{% for item in dict.values() %} -{% if not item.user == "all" %} -user {{ item.user }} +{% for key, value in mosquitto_acl.iteritems() %} +{% if not key == "all" %} +user {{ key }} {% endif %} +{% for item in value %} {{ item.acl_base if item.acl_base is defined else 'topic' }} {{ item.acl_policy }} {{ item.acl_topic }} {% endfor %}