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:
|
||||
src: "{{ ansible_fqdn }}.rules.v4"
|
||||
dest: /etc/iptables/rules.v4
|
||||
notify:
|
||||
- restart netfilter-persistent-v4
|
||||
|
||||
- name: Copy IPv6 ruleset
|
||||
copy:
|
||||
src: "{{ ansible_fqdn }}.rules.v6"
|
||||
dest: /etc/iptables/rules.v6
|
||||
|
||||
- name: Restart netfilter-persistent service to load rulesets
|
||||
service:
|
||||
name: netfilter-persistent
|
||||
state: restarted
|
||||
enabled: yes
|
||||
notify:
|
||||
- restart netfilter-persistent-v6
|
||||
|
Loading…
Reference in New Issue
Block a user