Add role to configure systemd-networkd

This commit is contained in:
Oliver Traber 2023-03-15 23:26:25 +01:00
parent 6c674ff530
commit f226b09f0a
Signed by: Bluemedia
GPG key ID: C0674B105057136C
5 changed files with 63 additions and 7 deletions

View file

@ -0,0 +1,7 @@
[Match]
MACAddress={{ hostvars[inventory_hostname]['mac'] }}
[Network]
Address={{ hostvars[inventory_hostname]['ansible_host'] }}/{{ (hostvars[inventory_hostname]['ansible_host'] + '/' + netmask) | ansible.utils.ipaddr('prefix') }}
Gateway={{ gateway }}
DNS={{ nameserver }}