ansible-alpine-host/templates/etc/network/interfaces.j2

17 lines
344 B
Plaintext
Raw Normal View History

2022-04-10 00:29:22 +00:00
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
2022-09-03 18:18:45 +00:00
address {{ ansible_host }}/{{ netmask }}
routes-static {{ gateway }},default via {{ gateway }}
2022-04-10 00:29:22 +00:00
{% if ip6 is defined %}
iface eth0 inet6 static
2022-09-03 18:18:45 +00:00
address {{ ip6 }}/{{ netmask6 }}
2022-04-10 00:29:22 +00:00
gateway {{ gateway6 }}
pre-up echo 0 > /proc/sys/net/ipv6/conf/eth0/accept_ra
{% endif %}