generated from sebclem/ansible-role-template
Fix config template
This commit is contained in:
parent
686a3495f6
commit
fb6426f3d5
@ -1,13 +1,23 @@
|
|||||||
{{ ansible_managed | comment }}
|
{{ ansible_managed | comment }}
|
||||||
|
|
||||||
{% for key, value in lldap_config %}
|
{% for key in lldap_config %}
|
||||||
{% if value is string %}
|
{% if lldap_config[key] is string %}
|
||||||
{{ key }}={{ value }}
|
{{ key }} = "{{ lldap_config[key] }}"
|
||||||
|
{% elif lldap_config[key] is number %}
|
||||||
|
{{ key }} = {{ lldap_config[key] }}
|
||||||
|
{% elif lldap_config[key] is bool %}
|
||||||
|
{{ key }} = {{ lldap_config[key] | ternary('true', 'false')}}
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
||||||
[{{ key }}]
|
[{{ key }}]
|
||||||
{% for entry, entry_value in value %}
|
{% for entry in lldap_config[key] %}
|
||||||
{{ entry }} = {{ entry_value }}
|
{{ entry }} = "{{ lldap_config[key][entry] }}"
|
||||||
|
{% if ldap_config[key][entry] is string %}
|
||||||
|
{{ entry }} = "{{ ldap_config[key][entry] }}"
|
||||||
|
{% elif ldap_config[key][entry] is number %}
|
||||||
|
{{ entry }} = {{ lldap_config[key][entry] }}
|
||||||
|
{% elif ldap_config[key][entry] is bool %}
|
||||||
|
{{ entry }} = {{ ldap_config[key][entry] | ternary('true', 'false')}}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
Reference in New Issue
Block a user