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

18 lines
539 B
YAML
Raw Normal View History

- name: Handle iptables-persistent
when:
- "is_docker is not true"
block:
- name: Install iptables-persistent package
ansible.builtin.package:
name: "{{ iptables_persistent_package_name_by_os_family[ansible_os_family] }}"
- name: Gather package facts
package_facts:
manager: auto
- name: Save iptables rules into /etc/iptables folder
when:
- "'iptables-persistent' in ansible_facts.packages"
block:
- include_tasks: "save_rules_for_{{ ansible_os_family }}.yml"