fix ansible_managed handling
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
a3006fe073
commit
a17324b935
@ -32,14 +32,16 @@ mosquitto_acl: []
|
|||||||
# mosquitto_acl:
|
# mosquitto_acl:
|
||||||
# - name: iot
|
# - name: iot
|
||||||
# user: admin
|
# user: admin
|
||||||
# acl_base: topic # (topic|pattern, defaults to topic)
|
# acls:
|
||||||
# acl_topic: "#"
|
# - acl_base: topic # (topic|pattern, defaults to topic)
|
||||||
# acl_policy: readwrite
|
# acl_topic: "#"
|
||||||
|
# acl_policy: readwrite
|
||||||
# - name: readonly_iot
|
# - name: readonly_iot
|
||||||
# user: user1
|
# user: user1
|
||||||
# acl_base: topic
|
# acls:
|
||||||
# acl_topic: my/devices
|
# - acl_base: topic
|
||||||
# acl_policy: readwrite
|
# acl_topic: my/devices
|
||||||
|
# acl_policy: readwrite
|
||||||
|
|
||||||
mosquitto_tls_enabled: False
|
mosquitto_tls_enabled: False
|
||||||
mosquitto_tls_ciphers:
|
mosquitto_tls_ciphers:
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
# {{ ansible_managed }}
|
{{ ansible_managed | comment }}
|
||||||
|
{% for item in mosquitto_acl %}
|
||||||
{% for key, value in mosquitto_acl.iteritems() %}
|
{% if not item.name == "all" %}
|
||||||
{% if not key == "all" %}
|
user {{ item.name }}
|
||||||
user {{ key }}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% for item in value %}
|
{% for acl in item.acls %}
|
||||||
{{ 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 %}
|
{% endfor %}
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
Loading…
Reference in New Issue
Block a user