openstack-ansible-lxc_hosts/templates/lxc-net-bridge.cfg.j2
Kevin Carter 53a6cce9ed
Use handlers to restart services and move dnsmasq to a unit file
These changes further optimise the lxc_host role so that it's using more
of the built in modules and making better use of handlers.

Moving the dnsmasq process to a unit file gives operators the ability to
restart the dnsmasq process if there's an issue with the service. It
also ensures the service stays running as systemd will take better care
of the service by isolating it within a specific cgroup, ensuring good
reporting and memory management, and providing the ability to recover
from failures in an automated way.

Closes-Bug: #1518485
Change-Id: I42d0caa3b12e70a3601c30051eefc067e81a71bb
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2017-11-01 15:19:22 -05:00

16 lines
380 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 %}
bridge_fd 0
bridge_maxwait 0
bridge_ports {{ lxc_net_bridge_port }}
bridge_hello 2
bridge_maxage 12
bridge_stp off