- name: Handle iptables-persistent when: - "is_docker is not true" - "iptables_persistent_save_to_file is 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"