New variable: wanted_ip6_suffix
This commit is contained in:
parent
0995761cf6
commit
df3cc89354
@ -66,7 +66,7 @@
|
|||||||
template:
|
template:
|
||||||
src: networking.j2
|
src: networking.j2
|
||||||
dest: /etc/network/interfaces
|
dest: /etc/network/interfaces
|
||||||
when: wanted_ip4 is defined or wanted_ip6 is defined
|
when: wanted_ip4 is defined or wanted_ip6 is defined or wanted_ip6_suffix is defined
|
||||||
tags:
|
tags:
|
||||||
- networking
|
- networking
|
||||||
|
|
||||||
|
@ -8,16 +8,24 @@ iface lo inet loopback
|
|||||||
# The main interface
|
# The main interface
|
||||||
auto {{ networking_main_iface }}
|
auto {{ networking_main_iface }}
|
||||||
{% if bridged_network is defined and bridged_network %}
|
{% if bridged_network is defined and bridged_network %}
|
||||||
|
{% if bridged_network != "true" %}
|
||||||
|
{% for iface in bridged_network.split(" ") %}
|
||||||
|
auto {{ iface }}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
auto br0
|
auto br0
|
||||||
iface br0
|
iface br0
|
||||||
requires {{ networking_main_iface }}{% if bridged_network != "true" %} {{ bridged_network }}{% endif +%}
|
requires {{ networking_main_iface }}{% if bridged_network != "true" %} {{ bridged_network }}{% endif +%}
|
||||||
bridge-ports {{ networking_main_iface }}{% if bridged_network != "true" %} {{ bridged_network }}{% endif +%}
|
bridge-ports {{ networking_main_iface }}{% if bridged_network != "true" %} {{ bridged_network }}{% endif +%}
|
||||||
bridge-fd 0
|
bridge-fd 0
|
||||||
bridge-stp off
|
bridge-stp off
|
||||||
|
{% if hw_address is defined %}
|
||||||
|
pre-up ip link set dev {{ networking_main_iface }} address {{ hw_address }}
|
||||||
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
iface {{ networking_main_iface }}
|
iface {{ networking_main_iface }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if hw_address is defined %}
|
{% if bridged_network is not defined and hw_address is defined %}
|
||||||
hwaddress ether {{ hw_address }}
|
hwaddress ether {{ hw_address }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if wanted_ip4 is defined %}
|
{% if wanted_ip4 is defined %}
|
||||||
@ -26,6 +34,9 @@ iface {{ networking_main_iface }}
|
|||||||
{% else %}
|
{% else %}
|
||||||
use dhcp
|
use dhcp
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if wanted_ip6_suffix is defined %}
|
||||||
|
up ip token set {{ wanted_ip6_suffix }}/64 dev {% if bridged_network is defined and bridged_network %}br0{% else %}{{ networking_main_iface }}{% endif %}
|
||||||
|
{% endif %}
|
||||||
{% if wanted_ip6 is defined %}
|
{% if wanted_ip6 is defined %}
|
||||||
{% if local_network.gateway6 is defined %}
|
{% if local_network.gateway6 is defined %}
|
||||||
address {{ wanted_ip6 }}/64
|
address {{ wanted_ip6 }}/64
|
||||||
|
Loading…
Reference in New Issue
Block a user