xoxys.network/templates/etc/sysconfig/network-scrips/ifcfg.j2
Robert Kaussow 587c41f839
Some checks failed
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/docs Pipeline failed
ci/woodpecker/push/notify Pipeline was successful
chore: remove quote from ifcfg
2024-06-21 22:55:49 +02:00

13 lines
360 B
Django/Jinja

#jinja2: lstrip_blocks: True
{{ ansible_managed | comment }}
DEVICE={{ item.key }}
{% for key, value in item.value.items() %}
{% if key | lower == "dns" and not value is string and value is iterable %}
{% for item in value -%}
DNS{{ loop.index }}={{ item }}
{% endfor %}
{% else %}
{{- key | upper }}={{ value }}
{% endif %}
{% endfor %}