zuul-jobs/roles/persistent-firewall/tasks/main.yaml
Sorin Sbarnea 4af438d136 Made sequence indent consistent
Change-Id: I5ea4232ca4fd6e03d5b5f72eb6704bee84d04ea5
2020-05-07 14:13:55 +01:00

31 lines
859 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: "{{ zj_distro_os }}"
static: no
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