openstack-ansible-lxc_hosts/templates/lxc-net-suseredhat-postdown.cfg.j2
Andy McCrae eee919ad21 Fix lxc_net configuration for CentOS/SUSE
For CentOS/Red Hat and SUSE the network post-up/post-down scripts are
configured after the bridge has been brought up, and the handlers have
been flushed.

We need to configure the post-up and post-down scripts before the
restart bridge handler is flushed, so that dnsmasq is configured and
running before we attempt to install packages into the container.

Change-Id: Ifdb52624ed792665c858b3cdd4eec4b6aa365b1e
2017-09-12 15:39:09 -06:00

8 lines
236 B
Django/Jinja

#!/usr/bin/env bash
if [ "{{ item.interface }}" == "{{ lxc_net_bridge }}" ];then
if [ "{{ lxc_net_nat }}" == "True" ];then
/usr/local/bin/lxc-system-manage dnsmasq-stop
/usr/local/bin/lxc-system-manage iptables-remove
fi
fi