New bridged_network option
This commit is contained in:
parent
52ce373592
commit
1e07ab7d7b
@ -51,6 +51,15 @@
|
||||
tags:
|
||||
- pkg
|
||||
|
||||
- name: install bridge (alpine)
|
||||
apk:
|
||||
name:
|
||||
- bridge
|
||||
state: present
|
||||
when: bridged_network is defined
|
||||
tags:
|
||||
- pkg
|
||||
|
||||
- name: install ssmtp (alpine)
|
||||
apk:
|
||||
name:
|
||||
|
@ -7,15 +7,23 @@ iface lo inet loopback
|
||||
|
||||
# The main interface
|
||||
auto eth0
|
||||
{% if bridged_network is defined and bridged_network %}
|
||||
auto br0
|
||||
iface br0
|
||||
requires eth0
|
||||
bridge-ports eth0
|
||||
bridge-fd 0
|
||||
bridge-stp off
|
||||
{% else %}
|
||||
iface eth0
|
||||
{% endif %}
|
||||
{% if wanted_ip4 is defined %}
|
||||
iface eth0 inet static
|
||||
address {{ wanted_ip4 }}/24
|
||||
gateway {{ local_network.gateway }}
|
||||
{% else %}
|
||||
iface eth0 inet dhcp
|
||||
use dhcp
|
||||
{% endif %}
|
||||
{% if wanted_ip6 is defined %}
|
||||
iface eth0 inet6 static
|
||||
{% if local_network.gateway6 is defined %}
|
||||
address {{ wanted_ip6 }}/64
|
||||
gateway {{ local_network.gateway6 }}
|
||||
|
Loading…
Reference in New Issue
Block a user