b5fffff87b
Change-Id: I95dca97c8f79a96d7710b33cb0ee243d3234b7ca
27 lines
535 B
YAML
27 lines
535 B
YAML
- name: Install iptables-persistent
|
|
become: yes
|
|
package:
|
|
name: iptables-persistent
|
|
state: present
|
|
|
|
- name: Persist ipv4 rules
|
|
become: yes
|
|
copy:
|
|
content: "{{ iptables_rules.stdout }}"
|
|
dest: "/etc/iptables/rules.v4"
|
|
mode: 0644
|
|
|
|
- name: Persist ipv6 rules
|
|
become: yes
|
|
copy:
|
|
content: "{{ ip6tables_rules.stdout }}"
|
|
dest: "/etc/iptables/rules.v6"
|
|
mode: 0644
|
|
|
|
- name: Ensure iptables-persistent is started
|
|
become: yes
|
|
service:
|
|
name: iptables-persistent
|
|
state: started
|
|
enabled: yes
|