26 lines
856 B
Django/Jinja
26 lines
856 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_nat == "true" %}
|
|
{% if lxc_net_gateway != "none" %}
|
|
gateway {{ lxc_net_gateway }}
|
|
{% endif %}
|
|
# nat rules start and stop
|
|
post-up /usr/local/bin/lxc-system-manage iptables-create
|
|
post-down /usr/local/bin/lxc-system-manage iptables-remove
|
|
{% endif %}
|
|
# dnsmasq start and stop
|
|
post-up /usr/local/bin/lxc-system-manage dnsmasq-start || true
|
|
post-up /usr/local/bin/lxc-system-manage iptables-create
|
|
post-down /usr/local/bin/lxc-system-manage dnsmasq-stop
|
|
post-down /usr/local/bin/lxc-system-manage iptables-remove
|
|
bridge_fd 0
|
|
bridge_maxwait 0
|
|
bridge_ports {{ lxc_net_bridge_port }}
|
|
bridge_hello 2
|
|
bridge_maxage 12
|
|
bridge_stp off
|