From cb3abd557431cc04aef5de1b302bcde25cd81c81 Mon Sep 17 00:00:00 2001 From: Niklas Yann Wettengel Date: Sat, 25 Mar 2017 14:33:23 +0100 Subject: added reload and restart handlers --- roles/configure_iptables/tasks/main.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'roles/configure_iptables/tasks/main.yml') diff --git a/roles/configure_iptables/tasks/main.yml b/roles/configure_iptables/tasks/main.yml index 34f6c27..e0e6625 100644 --- a/roles/configure_iptables/tasks/main.yml +++ b/roles/configure_iptables/tasks/main.yml @@ -3,24 +3,22 @@ copy: src: iptables.rules dest: /etc/iptables/iptables.rules - register: iptables_rules + notify: reload iptables - name: start and enable iptables service - when: iptables_rules.changed systemd: name: iptables.service enabled: yes - state: reloaded + state: started - name: copy ip6tables.rules copy: src: ip6tables.rules dest: /etc/iptables/ip6tables.rules - register: ip6tables_rules + notify: reload ip6tables - name: start and enable ip6tables service - when: ip6tables_rules.changed systemd: name: ip6tables.service enabled: yes - state: reloaded + state: started -- cgit v1.2.3-54-g00ecf