b5fffff87b
Change-Id: I95dca97c8f79a96d7710b33cb0ee243d3234b7ca
28 lines
549 B
YAML
28 lines
549 B
YAML
- name: Persist ipv4 rules
|
|
become: yes
|
|
copy:
|
|
content: "{{ iptables_rules.stdout }}"
|
|
dest: "/var/lib/iptables/rules-save"
|
|
mode: 0644
|
|
|
|
- name: Persist ipv6 rules
|
|
become: yes
|
|
copy:
|
|
content: "{{ ip6tables_rules.stdout }}"
|
|
dest: "/var/lib/ip6tables/rules-save"
|
|
mode: 0644
|
|
|
|
- name: Ensure iptables is started
|
|
become: yes
|
|
service:
|
|
name: iptables-restore
|
|
state: started
|
|
enabled: yes
|
|
|
|
- name: Ensure ip6tables is started
|
|
become: yes
|
|
service:
|
|
name: ip6tables-restore
|
|
state: started
|
|
enabled: yes
|