zuul-jobs/roles/persistent-firewall/tasks/main.yaml
Albin Vass 8614701f2a persistent-firewall: update include to include_tasks
Change-Id: I4654805d2d4beea9a7485eae970e36f237abf16b
2020-05-26 10:13:48 +02:00

30 lines
852 B
YAML

- name: List current ipv4 rules
become: yes
# Using shell to try and debug why this task when run sometimes returns -13
shell: iptables-save
changed_when: false
failed_when: false
register: iptables_rules
tags:
- skip_ansible_lint
- name: List current ipv6 rules
become: yes
# Using shell to try and debug why this task when run sometimes returns -13
shell: ip6tables-save
changed_when: false
failed_when: false
register: ip6tables_rules
tags:
- skip_ansible_lint
- name: Configure persistent iptables rules
include_tasks: "{{ zj_distro_os }}"
with_first_found:
- "persist/{{ ansible_distribution }}_{{ ansible_distribution_release }}.yaml"
- "persist/{{ ansible_distribution }}.yaml"
- "persist/{{ ansible_os_family }}.yaml"
- "persist/default.yaml"
loop_control:
loop_var: zj_distro_os