xoxys.network/templates/etc/sysconfig/network-scrips/ifcfg.j2

13 lines
362 B
Plaintext
Raw Permalink Normal View History

2022-09-18 13:02:53 +02:00
#jinja2: lstrip_blocks: True
2019-08-27 22:24:09 +02:00
{{ ansible_managed | comment }}
2017-05-18 23:10:07 +02:00
DEVICE="{{ item.key }}"
2022-09-18 13:02:53 +02:00
{% 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 %}
2017-05-18 23:10:07 +02:00
{% endfor %}