summaryrefslogtreecommitdiff
path: root/roles/cloud/post-install/templates/edis-kvm-interfaces.j2
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2022-12-06 19:18:27 +0100
committerChristian Pointner <equinox@spreadspace.org>2022-12-06 19:18:27 +0100
commit1fd7696d93eb792eca8b090f51cce475d249065f (patch)
treecfcee609ba4c871305bcbcde9f636c3591adad5e /roles/cloud/post-install/templates/edis-kvm-interfaces.j2
parentcloud/install: some more more tests for edis (diff)
add simple interfaces template for edis kvm hosts
Diffstat (limited to 'roles/cloud/post-install/templates/edis-kvm-interfaces.j2')
-rw-r--r--roles/cloud/post-install/templates/edis-kvm-interfaces.j221
1 files changed, 21 insertions, 0 deletions
diff --git a/roles/cloud/post-install/templates/edis-kvm-interfaces.j2 b/roles/cloud/post-install/templates/edis-kvm-interfaces.j2
new file mode 100644
index 00000000..1cb7c511
--- /dev/null
+++ b/roles/cloud/post-install/templates/edis-kvm-interfaces.j2
@@ -0,0 +1,21 @@
+# This file describes the network interfaces available on your system
+# and how to activate them. For more information, see interfaces(5).
+
+source /etc/network/interfaces.d/*
+
+# The loopback network interface
+auto lo
+iface lo inet loopback
+
+
+auto {{ network.primary.name }}
+iface {{ network.primary.name }} inet static
+ pre-up echo 0 > /proc/sys/net/ipv6/conf/$IFACE/accept_ra
+ pre-up echo 0 > /proc/sys/net/ipv6/conf/$IFACE/autoconf
+ address {{ network.primary.address | ansible.utils.ipaddr('address') }}
+ netmask {{ network.primary.address | ansible.utils.ipaddr('netmask') }}
+ gateway {{ network.primary.gateway }}
+
+iface {{ network.primary.name }} inet6 static
+ address {{ network.primary.address6 }}
+ gateway {{ network.primary.gateway6 }}