summaryrefslogtreecommitdiff
path: root/roles/vm/guest/network/templates/interfaces.j2
blob: 8e2f324c449900ba5a23fac00a28699ee2ded30a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# 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
{% for interface in network_cooked.interfaces %}


auto {{ interface.name }}
iface {{ interface.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
{%   include 'interfaces/' + (interface.config | default('simple')) + '.j2' %}
{%   if 'address6' in interface %}

iface {{ interface.name }} inet6 static
{%     include 'interfaces/' + (interface.config | default('simple6')) + '.j2' %}
{%   endif %}
{% endfor %}