From 5098d6653b551ab253acf5b86434ab2f57ef8ad8 Mon Sep 17 00:00:00 2001 From: kalpanas Date: Mon, 11 Aug 2025 14:09:21 +0530 Subject: [PATCH] set default policies to ACCEPT before flushing iptables rules --- playbooks/cns-uninstall.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/playbooks/cns-uninstall.yaml b/playbooks/cns-uninstall.yaml index aa2220ed..ab646582 100755 --- a/playbooks/cns-uninstall.yaml +++ b/playbooks/cns-uninstall.yaml @@ -145,6 +145,16 @@ failed_when: false no_log: True + - name: Reset iptables default policies to ACCEPT + ansible.builtin.shell: "{{ item }}" + become: true + with_items: + - iptables -P INPUT ACCEPT + - iptables -P FORWARD ACCEPT + - iptables -P OUTPUT ACCEPT + ignore_errors: yes + failed_when: false + - name: IPTables Cleanup ignore_errors: yes failed_when: false