3c60b35a19
We continue to see the odd task rc of -13 when running iptables-save to store persistent set of firewall rules. Switch to shell to give us a bit more debugging freedom if necessary (and to rule out the command module). Change-Id: I0c0208101cad985d4113de6b636c3816613b778c
29 lines
806 B
YAML
29 lines
806 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: "{{ item }}"
|
|
static: no
|
|
with_first_found:
|
|
- "persist/{{ ansible_distribution }}_{{ ansible_distribution_release }}.yaml"
|
|
- "persist/{{ ansible_distribution }}.yaml"
|
|
- "persist/{{ ansible_os_family }}.yaml"
|
|
- "persist/default.yaml"
|