summaryrefslogtreecommitdiff
path: root/roles/common/templates/interfaces.j2
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2026-05-05 13:20:34 -0400
committerFreya Murphy <freya@freyacat.org>2026-05-05 13:20:34 -0400
commiteacc69b26ea680e3a1e6fd9abb2ac73e6800a890 (patch)
treea216e8d868377ce94cbdead2a897bedd95a235de /roles/common/templates/interfaces.j2
parentremove deprecated var (diff)
downloadansible-eacc69b26ea680e3a1e6fd9abb2ac73e6800a890.tar.gz
ansible-eacc69b26ea680e3a1e6fd9abb2ac73e6800a890.tar.bz2
ansible-eacc69b26ea680e3a1e6fd9abb2ac73e6800a890.zip
add network configuration
Diffstat (limited to 'roles/common/templates/interfaces.j2')
-rw-r--r--roles/common/templates/interfaces.j211
1 files changed, 11 insertions, 0 deletions
diff --git a/roles/common/templates/interfaces.j2 b/roles/common/templates/interfaces.j2
new file mode 100644
index 0000000..a9bb092
--- /dev/null
+++ b/roles/common/templates/interfaces.j2
@@ -0,0 +1,11 @@
+{% set iface = net_interface
+ | default(ansible_facts.get('default_ipv4', {}).get('interface'))
+ | default('eth0') %}
+auto lo
+iface lo inet loopback
+
+auto {{ iface }}
+iface {{ iface }} inet static
+ address {{ net_address_prefix }}{{ net_address_suffix }}
+ netmask {{ net_netmask }}
+ gateway {{ net_gateway }}