common/tasks/iptables/install.yml
2020-02-10 10:41:05 +05:00

30 lines
746 B
YAML

---
- name: Install iptables-persistent
apt:
name: iptables-persistent
- name: Create directory for iptables configuration
file:
state: directory
path: '{{ common__iptables__conf_dir }}'
mode: 'u=rwx,g=rx,o=rx'
owner: root
group: root
- name: Install iptables rules for IPv4
template:
src: templates/iptables/rules.v4
dest: '{{ common__iptables__conf_ipv4 }}'
mode: 'u=rw,g=r,o=r'
owner: root
group: root
notify: common | Load iptables rules for IPv4
- name: Install iptables rules for IPv6
template:
src: templates/iptables/rules.v6
dest: '{{ common__iptables__conf_ipv6 }}'
mode: 'u=rw,g=r,o=r'
owner: root
group: root
notify: common | Load iptables rules for IPv6