try to fix acl template
This commit is contained in:
parent
dcdcac728a
commit
f45db7d27e
@ -38,9 +38,8 @@
|
|||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0600
|
mode: 0600
|
||||||
with_dict: "{{ mosquitto_password_auth_users | default('{}') }}"
|
|
||||||
when:
|
when:
|
||||||
- mosquitto_acl_enabled
|
- mosquitto_acl_enabled
|
||||||
- mosquitto_acl
|
- mosquitto_acl is defined
|
||||||
become: True
|
become: True
|
||||||
become_user: root
|
become_user: root
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
# {{ ansible_managed }}
|
# {{ ansible_managed }}
|
||||||
|
|
||||||
{% for acl in mosquitto_acl %}
|
{% for item in mosquitto_acl.values() %}
|
||||||
{% if not acl.user == "all" %}
|
{% if not item.user == "all" %}
|
||||||
{{ acl.user }}
|
{{ item.user }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ acl.acl_base if acl.acl_base is defined else 'topic' }} {{ acl.acl_policy }} {{ acl.acl_topic }}
|
{{ item.acl_base if item.acl_base is defined else 'topic' }} {{ item.acl_policy }} {{ item.acl_topic }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
Loading…
Reference in New Issue
Block a user