openstack-ansible-lxc_hosts/templates/lxc-net-bridge.cfg.j2
Kevin Carter eb9f3d858b IRR for lxc_host
The change moves the role out from the main repo lxc_host
repository and into its own standalone repository.

Items within this change:
  * The role has been updated to ensure it runs standalone.
  * Tests added to the role within tox.
  * Functional tests added to the role that can either be run
    via the run_tests.sh script or using tox.
  * dev requirements have been updated for testing usecases.
  * Docs added to both the README.rst file as well as the docs
    folder.

Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2015-11-03 04:22:57 -06:00

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