add handlers to firewall-ruleset-deploy
This commit is contained in:
parent
3002276209
commit
4c23562144
13
ubuntu/roles/firewall-ruleset-deploy/handlers/main.yml
Normal file
13
ubuntu/roles/firewall-ruleset-deploy/handlers/main.yml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
- name: restart netfilter-persistent-v4
|
||||||
|
service:
|
||||||
|
name: netfilter-persistent
|
||||||
|
state: restarted
|
||||||
|
enabled: yes
|
||||||
|
|
||||||
|
- name: restart netfilter-persistent-v6
|
||||||
|
service:
|
||||||
|
name: netfilter-persistent
|
||||||
|
state: restarted
|
||||||
|
enabled: yes
|
@ -14,14 +14,12 @@
|
|||||||
copy:
|
copy:
|
||||||
src: "{{ ansible_fqdn }}.rules.v4"
|
src: "{{ ansible_fqdn }}.rules.v4"
|
||||||
dest: /etc/iptables/rules.v4
|
dest: /etc/iptables/rules.v4
|
||||||
|
notify:
|
||||||
|
- restart netfilter-persistent-v4
|
||||||
|
|
||||||
- name: Copy IPv6 ruleset
|
- name: Copy IPv6 ruleset
|
||||||
copy:
|
copy:
|
||||||
src: "{{ ansible_fqdn }}.rules.v6"
|
src: "{{ ansible_fqdn }}.rules.v6"
|
||||||
dest: /etc/iptables/rules.v6
|
dest: /etc/iptables/rules.v6
|
||||||
|
notify:
|
||||||
- name: Restart netfilter-persistent service to load rulesets
|
- restart netfilter-persistent-v6
|
||||||
service:
|
|
||||||
name: netfilter-persistent
|
|
||||||
state: restarted
|
|
||||||
enabled: yes
|
|
||||||
|
Loading…
Reference in New Issue
Block a user