Restart lxc-dnsmasq after clearing iptables rules
When a functional test is run against the same host more than once and iptables rules are managed by lxc-dnsmasq the rules that lxc-dnsmasq created during the first run are removed, preventing containers from accessing external networks. Add a notify to restart the service and recreate the rules. Change-Id: Ia3b39c7f81d24de10fe23cb000b1253f4b3dcbfd
This commit is contained in:
parent
586ee2c967
commit
cd8de5c66d
|
@ -30,6 +30,7 @@
|
||||||
|
|
||||||
- name: Clear iptables rules
|
- name: Clear iptables rules
|
||||||
shell: "{{ playbook_dir }}/iptables-clear.sh"
|
shell: "{{ playbook_dir }}/iptables-clear.sh"
|
||||||
|
register: iptables_clear
|
||||||
tags:
|
tags:
|
||||||
- skip_ansible_lint
|
- skip_ansible_lint
|
||||||
|
|
||||||
|
@ -235,3 +236,12 @@
|
||||||
- network_interfaces_rhel is changed
|
- network_interfaces_rhel is changed
|
||||||
- item.alias is defined
|
- item.alias is defined
|
||||||
with_items: "{{ bridges }}"
|
with_items: "{{ bridges }}"
|
||||||
|
|
||||||
|
- name: Trigger dnsmasq restart
|
||||||
|
command: /bin/true
|
||||||
|
changed_when:
|
||||||
|
- lxc_net_manage_iptables | bool
|
||||||
|
- iptables_clear is defined
|
||||||
|
- iptables_clear is changed
|
||||||
|
notify:
|
||||||
|
- Restart dnsmasq
|
||||||
|
|
Loading…
Reference in New Issue