configurations-ansible/roles/iptables-persistent/tasks/save_rules_for_Debian.yml

9 lines
328 B
YAML
Raw Normal View History

- name: Save iptables rules
when: "iptables_persistent_save_to_file is true"
block:
- name: Save rules with iptables-persistent v4
ansible.builtin.shell: iptables-save > /etc/iptables/rules.v4
- name: Save rules with iptables-persistent v6
ansible.builtin.shell: ip6tables-save > /etc/iptables/rules.v6