summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2024-01-04 12:59:39 +0100
committerGuilhem Moulin <guilhem@fripost.org>2024-01-04 13:42:18 +0100
commit6691410f945719e62601c3d69d9b2ff9c4cfb4fb (patch)
tree9ea4170a6d5d50ac14a326f42fa8b13303734241 /templates
parent609574f51c5c08af71419bddc1be16ad5668882a (diff)
Base system.
Diffstat (limited to 'templates')
-rw-r--r--templates/etc/apt/sources.list.d/debian.sources.j29
-rw-r--r--templates/etc/systemd/network/01-wired.network.j213
2 files changed, 22 insertions, 0 deletions
diff --git a/templates/etc/apt/sources.list.d/debian.sources.j2 b/templates/etc/apt/sources.list.d/debian.sources.j2
new file mode 100644
index 0000000..980daaf
--- /dev/null
+++ b/templates/etc/apt/sources.list.d/debian.sources.j2
@@ -0,0 +1,9 @@
+Types: deb
+URIs: https://deb.debian.org/debian
+Suites: {{ ansible_lsb.codename }} {{ ansible_lsb.codename }}-updates
+Components: main non-free-firmware
+
+Types: deb
+URIs: https://deb.debian.org/debian-security
+Suites: {{ ansible_lsb.codename }}-security
+Components: main non-free-firmware
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 %}