From 6691410f945719e62601c3d69d9b2ff9c4cfb4fb Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Thu, 4 Jan 2024 12:59:39 +0100 Subject: Base system. --- templates/etc/systemd/network/01-wired.network.j2 | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 templates/etc/systemd/network/01-wired.network.j2 (limited to 'templates/etc/systemd') diff --git a/templates/etc/systemd/network/01-wired.network.j2 b/templates/etc/systemd/network/01-wired.network.j2 new file mode 100644 index 0000000..7be5d21 --- /dev/null +++ b/templates/etc/systemd/network/01-wired.network.j2 @@ -0,0 +1,13 @@ +[Match] +Name={{ ansible_default_ipv4.interface }} + +[Network] +DHCP=yes + +{% if ansible_default_ipv6.get('scope', '') == 'global' %} +[Address] +Address={{ ansible_default_ipv6.address }}/{{ ansible_default_ipv6.prefix }} + +[Route] +Gateway={{ ansible_default_ipv6.gateway }} +{%- endif %} -- cgit v1.2.3