b5fffff87b
Change-Id: I95dca97c8f79a96d7710b33cb0ee243d3234b7ca
28 lines
604 B
YAML
28 lines
604 B
YAML
- name: Persist ipv4 rules
|
|
become: yes
|
|
copy:
|
|
content: "{{ iptables_rules.stdout }}"
|
|
dest: "/etc/sysconfig/iptables"
|
|
mode: 0644
|
|
|
|
- name: Persist ipv6 rules
|
|
become: yes
|
|
copy:
|
|
content: "{{ ip6tables_rules.stdout }}"
|
|
dest: "/etc/sysconfig/ip6tables"
|
|
mode: 0644
|
|
|
|
# This provides the systemd unit file for iptables which might not be installed
|
|
- name: Ensure iptables-services is installed
|
|
become: yes
|
|
package:
|
|
name: iptables-services
|
|
state: present
|
|
|
|
- name: Ensure iptables is started
|
|
become: yes
|
|
service:
|
|
name: iptables
|
|
state: started
|
|
enabled: yes
|