change to native ansible iptables flush

This commit is contained in:
Markus Fischbacher
2020-05-19 09:36:53 +02:00
parent bdd2d21dfc
commit 02e9b3607d

View File

@@ -17,11 +17,8 @@
register: boot_cmdline register: boot_cmdline
- name: Flush iptables before changing iptables-legacy - name: Flush iptables before changing iptables-legacy
shell: iptables:
cmd: 'iptables -F' flush: true
register: flush_iptables
changed_when:
- flush_iptables.rc == 0 and flush_iptables.stdout_lines.count == 0
when: when:
- ansible_facts.distribution_release is search("buster") - ansible_facts.distribution_release is search("buster")