fail2ban: Install munin plugin if available
This commit is contained in:
parent
cf8b110abb
commit
25a5ffd6ef
|
@ -3,3 +3,8 @@
|
||||||
service:
|
service:
|
||||||
name: fail2ban
|
name: fail2ban
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
||||||
|
- name: restart munin-node
|
||||||
|
service:
|
||||||
|
name: munin-node
|
||||||
|
state: restarted
|
||||||
|
|
|
@ -47,3 +47,34 @@
|
||||||
tags:
|
tags:
|
||||||
- fail2ban
|
- fail2ban
|
||||||
- packages
|
- packages
|
||||||
|
|
||||||
|
- name: is Munin present ?
|
||||||
|
stat:
|
||||||
|
path: /etc/munin/plugins
|
||||||
|
check_mode: no
|
||||||
|
register: etc_munin_plugins
|
||||||
|
tags:
|
||||||
|
- fail2ban
|
||||||
|
- munin
|
||||||
|
|
||||||
|
- name: is fail2ban Munin plugin available ?
|
||||||
|
stat:
|
||||||
|
path: /usr/share/munin/plugins/fail2ban
|
||||||
|
check_mode: no
|
||||||
|
register: fail2ban_munin_plugin
|
||||||
|
tags:
|
||||||
|
- fail2ban
|
||||||
|
- munin
|
||||||
|
|
||||||
|
- name: Enable Munin plugins
|
||||||
|
file:
|
||||||
|
src: "/usr/share/munin/plugins/fail2ban"
|
||||||
|
dest: "/etc/munin/plugins/fail2ban"
|
||||||
|
state: link
|
||||||
|
notify: restart munin-node
|
||||||
|
when:
|
||||||
|
- etc_munin_plugins.stat.exists?
|
||||||
|
- fail2ban_munin_plugin.stat.exists?
|
||||||
|
tags:
|
||||||
|
- fail2ban
|
||||||
|
- munin
|
||||||
|
|
Loading…
Reference in a new issue