Clark Boylan a554a401ea Use present for package state instead of installed
Ansible 2.9 does not accept the "installed" state so we need to update
occurences of that to "present".

Change-Id: I13c95794efc63697c2418334ded7c6912bd7b59f
2019-12-17 08:24:05 -08:00

25 lines
507 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"
- name: Persist ipv6 rules
become: yes
copy:
content: "{{ ip6tables_rules.stdout }}"
dest: "/etc/iptables/rules.v6"
- name: Ensure netfilter-persistent is started
become: yes
service:
name: netfilter-persistent
state: started
enabled: yes