roles/vm-*: Move to roles/vm/*
[noc.git] / ansible / roles / vm / network / templates / interfaces.j2
diff --git a/ansible/roles/vm/network/templates/interfaces.j2 b/ansible/roles/vm/network/templates/interfaces.j2
new file mode 100644 (file)
index 0000000..542e18d
--- /dev/null
@@ -0,0 +1,17 @@
+# 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
+
+# The primary network interface
+auto {{ vm_network.primary.interface }}
+iface {{ vm_network.primary.interface }} inet static
+  address {{ vm_network.primary.ip }}
+  netmask {{ vm_network.primary.mask }}
+  gateway {{ vm_network.primary.gateway }}
+  pre-up echo 0 > /proc/sys/net/ipv6/conf/$IFACE/accept_ra
+  pre-up echo 0 > /proc/sys/net/ipv6/conf/$IFACE/autoconf