This commit is contained in:
2021-09-05 02:25:16 +02:00
parent 707e261c13
commit 010eba0149
21 changed files with 714 additions and 63 deletions

View File

@ -1,4 +1,4 @@
# {{ ansible_managed }}
{{ ansible_managed | comment }}
{# {% for config in network_interfaces %} #}
{% for config in item.1 %}
@ -18,7 +18,7 @@ allow-{{ stanza }}
{% endfor -%}
iface {{ config.device }} {{ config.family | default('inet', true) }} {{ config.method | default('static', true) }}
{% set iface_keys = ['description', 'address', 'netmask', 'network', 'broadcast', 'gateway'] %}
{% set iface_keys = ['hwaddress ether', 'description', 'address', 'netmask', 'network', 'broadcast', 'gateway'] %}
{% for key in iface_keys %}
{% if key in config %}
{{ key }} {{ config[key] }}

View File

@ -1,4 +1,6 @@
# {{ ansible_managed }}
{{ ansible_managed | comment }}
source /etc/network/interfaces.d/*
#-----------------------------
# lo: loopback
@ -20,5 +22,3 @@ iface lo inet6 loopback
down /sbin/ip addr del {{ ip }} dev lo
{% endfor %}
{% endif %}
source /etc/network/interfaces.d/*