Fix config template

This commit is contained in:
SebClem 2023-04-19 17:30:14 +02:00
parent 686a3495f6
commit f736a09bc7
Signed by: sebclem
GPG Key ID: 5A4308F6A359EA50

View File

@ -1,13 +1,19 @@
{{ ansible_managed | comment }}
{% for key, value in lldap_config %}
{% if value is string %}
{{ key }}={{ value }}
{% for key in lldap_config %}
{% if lldap_config[key] is string %}
{{ key }} = "{{ lldap_config[key] }}"
{% elif lldap_config[key] is number %}
{{ entry }} = {{ lldap_config[key] | string | lower }}
{% else %}
[{{ key }}]
{% for entry, entry_value in value %}
{{ entry }} = {{ entry_value }}
{% for entry in lldap_config[key] %}
{% if lldap_config[key][entry] is string %}
{{ entry }} = "{{ lldap_config[key][entry] }}"
{% elif lldap_config[key][entry] is number %}
{{ entry }} = {{ lldap_config[key][entry] | string | lower }}
{% endif %}
{% endfor %}
{% endif %}