summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2026-03-06 16:16:06 +0100
committerGuilhem Moulin <guilhem@fripost.org>2026-03-06 16:16:11 +0100
commitdf87ea4c95bb2f5a8aba06c117292dfef37ea661 (patch)
tree2252a0b4fefa324fa7e2ef968f64ac37aacee771 /templates
parent1af347391f9f54b370dfc7395464b8ed637a79ca (diff)
Replace deprecated `ansible_$foo` with `ansible_facts[$foo]`.
Diffstat (limited to 'templates')
-rw-r--r--templates/etc/apt/sources.list.d/debian.sources.j24
-rw-r--r--templates/etc/postfix/main.cf.j24
-rw-r--r--templates/etc/systemd/network/01-wired.network.j28
3 files changed, 8 insertions, 8 deletions
diff --git a/templates/etc/apt/sources.list.d/debian.sources.j2 b/templates/etc/apt/sources.list.d/debian.sources.j2
index 3894b72..c859a4e 100644
--- a/templates/etc/apt/sources.list.d/debian.sources.j2
+++ b/templates/etc/apt/sources.list.d/debian.sources.j2
@@ -1,11 +1,11 @@
Types: deb
URIs: https://deb.debian.org/debian
-Suites: {{ ansible_lsb.codename }} {{ ansible_lsb.codename }}-updates
+Suites: {{ ansible_facts.lsb.codename }} {{ ansible_facts.lsb.codename }}-updates
Components: main non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.pgp
Types: deb
URIs: https://deb.debian.org/debian-security
-Suites: {{ ansible_lsb.codename }}-security
+Suites: {{ ansible_facts.lsb.codename }}-security
Components: main non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.pgp
diff --git a/templates/etc/postfix/main.cf.j2 b/templates/etc/postfix/main.cf.j2
index 35a6790..10313b4 100644
--- a/templates/etc/postfix/main.cf.j2
+++ b/templates/etc/postfix/main.cf.j2
@@ -9,8 +9,8 @@ compatibility_level = 3.6
smtputf8_enable = no
myorigin = /etc/mailname
-myhostname = {{ ansible_fqdn }}
-mydomain = {{ ansible_domain }}
+myhostname = {{ ansible_facts.fqdn }}
+mydomain = {{ ansible_facts.domain }}
append_dot_mydomain = no
# This server is for internal use only
diff --git a/templates/etc/systemd/network/01-wired.network.j2 b/templates/etc/systemd/network/01-wired.network.j2
index 7be5d21..dc85b2e 100644
--- a/templates/etc/systemd/network/01-wired.network.j2
+++ b/templates/etc/systemd/network/01-wired.network.j2
@@ -1,13 +1,13 @@
[Match]
-Name={{ ansible_default_ipv4.interface }}
+Name={{ ansible_facts.default_ipv4.interface }}
[Network]
DHCP=yes
-{% if ansible_default_ipv6.get('scope', '') == 'global' %}
+{% if ansible_facts.default_ipv6.get('scope', '') == 'global' %}
[Address]
-Address={{ ansible_default_ipv6.address }}/{{ ansible_default_ipv6.prefix }}
+Address={{ ansible_facts.default_ipv6.address }}/{{ ansible_facts.default_ipv6.prefix }}
[Route]
-Gateway={{ ansible_default_ipv6.gateway }}
+Gateway={{ ansible_facts.default_ipv6.gateway }}
{%- endif %}