0bb84bc58e
We configured iptables rules but did not persist them. This meant that rules would be flushed when restarting iptables or the instance. Change-Id: I9d90f55323a33d6a0f0dda1f7ab25d10984fa6cb
19 lines
375 B
YAML
19 lines
375 B
YAML
- name: Persist ipv4 rules
|
|
become: yes
|
|
copy:
|
|
content: "{{ iptables_rules.stdout }}"
|
|
dest: "/etc/sysconfig/iptables"
|
|
|
|
- name: Persist ipv6 rules
|
|
become: yes
|
|
copy:
|
|
content: "{{ ip6tables_rules.stdout }}"
|
|
dest: "/etc/sysconfig/ip6tables"
|
|
|
|
- name: Ensure iptables is started
|
|
become: yes
|
|
service:
|
|
name: iptables
|
|
state: started
|
|
enabled: yes
|