--- /dev/null
+- name: Restart firewall
+ become: true
+ service:
+ name: iptables.sh
+ state: restarted
name: fail2ban
state: latest
update_cache: yes
- register: fail2ban
+ notify: Restart firewall
- name: Configure Debian firewall
become: true
directory_mode: '0750'
mode: '0750'
force: no
- register: etc
+ notify: Restart firewall
- name: Fix permissions for /etc/network/functions
become: true
file:
path: /etc/network/functions.phd
mode: '0640'
- register: functions
-
-- name: Start Debian firewall
- become: true
- service:
- name: iptables.sh
- state: restarted
- when: fail2ban.changed or etc.changed or functions.changed
+ notify: Restart firewall
--- /dev/null
+- name: Restart firewall
+ become: true
+ command: /etc/rc.d/init.d/iptables.sh start
name: ['fail2ban', 'iptables-services']
state: latest
update_cache: yes
- register: services
+ notify: Restart firewall
- name: Disable firewalld
become: true
directory_mode: '0750'
mode: '0750'
force: no
- register: etc
+ notify: Restart firewall
- name: Fix permissions for /etc/network/functions
become: true
file:
path: /etc/network/functions.phd
mode: '0640'
- register: functions
-
-- name: Start iptables
- become: true
- command: /etc/rc.d/init.d/iptables.sh start
- when: services.changed or etc.changed or functions.changed
+ notify: Restart firewall