diff --git a/CHANGELOG.md b/CHANGELOG.md index c7ca30e5..b0a4f0bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,6 +55,7 @@ The **patch** part changes incrementally at each release. * lxc: rely on lxc_container module instead of command module * lxc: remove useless loop in apt execution * lxc: update our default template to be compatible with Debian 10 +* minifirewall: better alert5 activation * minifirewall: no http filtering by default * nagios-nrpe: update check_redis_instances (same as redis role) * nagios-nrpe: change default haproxy socket path diff --git a/minifirewall/tasks/activate.yml b/minifirewall/tasks/activate.yml index 1ecd0dc3..d0b28220 100644 --- a/minifirewall/tasks/activate.yml +++ b/minifirewall/tasks/activate.yml @@ -1,7 +1,29 @@ --- + +- name: check if /etc/init.d/alert5 exists + stat: + path: /etc/init.d/alert5 + register: initd_alert5 + - name: Uncomment minifirewall start line replace: dest: /etc/init.d/alert5 regexp: '^#/etc/init.d/minifirewall start' replace: '/etc/init.d/minifirewall start' - when: minifirewall_autostart + when: + - initd_alert5.stat.exists + - minifirewall_autostart + +- name: check if /usr/share/scripts/alert5 exists + stat: + path: /usr/share/scripts/alert5 + register: usr_share_scripts_alert5 + +- name: Uncomment minifirewall start line + replace: + dest: /usr/share/scripts/alert5 + regexp: '^#/etc/init.d/minifirewall start' + replace: '/etc/init.d/minifirewall start' + when: + - usr_share_scripts_alert5.stat.exists + - minifirewall_autostart