fix templating

This commit is contained in:
Robert Kaussow 2018-11-07 22:11:13 +01:00
parent f45db7d27e
commit 4f5f167085
2 changed files with 5 additions and 1 deletions

View File

@ -41,5 +41,6 @@
when:
- mosquitto_acl_enabled
- mosquitto_acl is defined
notify: __mosquitto_restart
become: True
become_user: root

View File

@ -1,8 +1,11 @@
# {{ ansible_managed }}
{% for item in mosquitto_acl.values() %}
{% for dict in mosquitto_acl %}
{% for item in dict.values() %}
{% if not item.user == "all" %}
{{ item.user }}
{% endif %}
{{ item.acl_base if item.acl_base is defined else 'topic' }} {{ item.acl_policy }} {{ item.acl_topic }}
{% endfor %}
{% endfor %}