From 95a082d3c771fbe9a380f10280134406b7dc3f93 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Tue, 8 Aug 2023 22:30:18 +0200 Subject: firewall: reboot on rule changes Just restaring netfilter-persistent could break other services depending on iptables, like Docker. Also, I'm not sure why I need a wait_for_connection after a reboot call, so get rid of those. --- roles/firewall/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'roles/firewall/tasks') diff --git a/roles/firewall/tasks/main.yml b/roles/firewall/tasks/main.yml index 9fcf543..345f6a6 100644 --- a/roles/firewall/tasks/main.yml +++ b/roles/firewall/tasks/main.yml @@ -16,7 +16,7 @@ loop: - {src: rules.v4, dest: /etc/iptables/rules.v4} - {src: rules.v6, dest: /etc/iptables/rules.v6} - notify: Reload iptables + notify: Reboot -- name: Flush handlers +- name: Reboot if necessary ansible.builtin.meta: flush_handlers -- cgit v1.2.3