Restart dnsmasq after clearing iptables
During a test run, iptables is cleared and NATs are implemented by dnsmasq. On subsequent runs, the clearing of iptables blows out the NATs and the dnsmasq restart handler is not properly triggered. This patch shifts the task to where the handler can be properly notified. Change-Id: I4a274e0bfc6b099dc465ee11087977836b66f249
This commit is contained in:
parent
7d0575f610
commit
7475853519
|
@ -99,6 +99,15 @@
|
|||
roles:
|
||||
- role: "lxc_hosts"
|
||||
|
||||
post_tasks:
|
||||
- name: Trigger dnsmasq restart
|
||||
command: /bin/true
|
||||
changed_when:
|
||||
- (lxc_net_manage_iptables is defined) and (lxc_net_manage_iptables | bool)
|
||||
- (iptables_clear is defined) and (iptables_clear is changed)
|
||||
notify:
|
||||
- Restart dnsmasq
|
||||
|
||||
- name: Playbook for configuring test host networking
|
||||
hosts: localhost
|
||||
# This set of tasks runs against localhost
|
||||
|
@ -206,14 +215,6 @@
|
|||
setup:
|
||||
gather_subset: "all"
|
||||
|
||||
- name: Trigger dnsmasq restart
|
||||
command: /bin/true
|
||||
changed_when:
|
||||
- (lxc_net_manage_iptables is defined) and (lxc_net_manage_iptables | bool)
|
||||
- (iptables_clear is defined) and (iptables_clear is changed)
|
||||
notify:
|
||||
- Restart dnsmasq
|
||||
|
||||
- name: Set interfaces fact
|
||||
set_fact:
|
||||
active_interfaces: |-
|
||||
|
|
Loading…
Reference in New Issue