diff --git a/templates/etc/mosquitto/aclfile.j2 b/templates/etc/mosquitto/aclfile.j2 index d99d017..66ab2b4 100644 --- a/templates/etc/mosquitto/aclfile.j2 +++ b/templates/etc/mosquitto/aclfile.j2 @@ -1,8 +1,8 @@ # {{ ansible_managed }} -{% for item in mosquitto_acl.values() %} -{% if not item.user == "all" %} -{{ item.user }} +{% for acl in mosquitto_acl %} +{% if not acl.user == "all" %} +{{ acl.user }} {% endif %} -{{ item.acl_base if item.acl_base is defined else 'topic' }} {{ item.acl_policy }} {{ item.acl_topic }} +{{ acl.acl_base if acl.acl_base is defined else 'topic' }} {{ acl.acl_policy }} {{ acl.acl_topic }} {% endfor %}