fff13e53d7
Added lxc_net_manage_iptables variable. Setting this variable avoids duplcaiting the existing rules. Change-Id: I76800d23929bd2a6f656a20095b7d2352a4757fa
30 lines
874 B
Django/Jinja
30 lines
874 B
Django/Jinja
# {{ ansible_managed }}
|
|
|
|
auto {{ lxc_net_bridge }}
|
|
iface {{ lxc_net_bridge }} inet static
|
|
address {{ lxc_net_address }}
|
|
netmask {{ lxc_net_netmask }}
|
|
{% if lxc_net_gateway is not none %}
|
|
gateway {{ lxc_net_gateway }}
|
|
{% endif %}
|
|
{% if lxc_net_mtu is defined %}
|
|
mtu {{ lxc_net_mtu }}
|
|
{% endif %}
|
|
{% if lxc_net_nat | bool %}
|
|
# dnsmasq start and stop
|
|
{% if lxc_net_manage_iptables | bool %}
|
|
post-up /usr/local/bin/lxc-system-manage iptables-create
|
|
{% endif %}
|
|
post-up /usr/local/bin/lxc-system-manage dnsmasq-start || true
|
|
{% if lxc_net_manage_iptables | bool %}
|
|
post-down /usr/local/bin/lxc-system-manage iptables-remove
|
|
{% endif %}
|
|
post-down /usr/local/bin/lxc-system-manage dnsmasq-stop
|
|
{% endif %}
|
|
bridge_fd 0
|
|
bridge_maxwait 0
|
|
bridge_ports {{ lxc_net_bridge_port }}
|
|
bridge_hello 2
|
|
bridge_maxage 12
|
|
bridge_stp off
|