Update to 2021-12-01 19:13

This commit is contained in:
Daniel Berteaud
2021-12-01 19:13:34 +01:00
commit 4c4556c660
2153 changed files with 60999 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
127.0.0.1 localhost
::1 localhost6
{% if net_hosts is not defined or net_hosts | length < 1 %}
{{ ansible_default_ipv4.address }} {{ inventory_hostname }} {{ inventory_hostname | regex_replace('^([^\.]+)\..*','\\1') }}{% if system_hostname is defined %} {{ system_hostname }}{% endif %}
{% else %}
{% for host in net_hosts %}
{{ host.ip }} {{ host.aliases | join(' ') }}
{% endfor %}
{% endif %}

View File

@@ -0,0 +1,29 @@
# {{ ansible_managed }}
ANSIBLE=yes
NAME={{ item.name }}
DEVICE={{ item.name }}
BOOTPROTO={{ (item.ip4.enabled == True and item.ip4.method == 'dhcp') | ternary('dhcp', 'none') }}
ONBOOT=yes
{% if item.bridge is defined and item.type != 'bridge' %}
BRIDGE={{ item.bridge }}
{% endif %}
{% if item.type == 'vlan' %}
TYPE=Vlan
VLAN=yes
{% if item.vlanid is defined %}
VLAN_ID={{ item.vlanid }}
{% endif %}
{% if item.vlandev is defined %}
PHYSDEV={{ item.vlandev }}
{% endif %}
{% elif item.type == 'bridge' %}
TYPE=Bridge
STP=off
{% endif %}
{% if item.ip4.enabled == True and item.ip4.method != 'dhcp' %}
{% for addr in item.ip4.addr | default([]) %}
IPADDR{{ ansible_loop.index0 }}={{ addr.split('/')[0] }}
PREFIX{{ ansible_loop.index0 }}={{ addr.split('/')[1] }}
{% endfor %}
{% endif %}
IPV6INIT=no