drbd-utils: check if Nagios/Munin are installed
This commit is contained in:
parent
d42c450573
commit
9d5a099fc4
|
@ -1,15 +1,22 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
|
- name: Check if Munin plugins exists
|
||||||
|
stat:
|
||||||
|
path: /etc/munin/plugins/
|
||||||
|
register: munin_plugins_dir
|
||||||
|
|
||||||
# https://raw.githubusercontent.com/munin-monitoring/contrib/master/plugins/drbd/drbd
|
# https://raw.githubusercontent.com/munin-monitoring/contrib/master/plugins/drbd/drbd
|
||||||
- name: Get Munin plugin
|
- name: Get Munin plugin
|
||||||
copy:
|
copy:
|
||||||
src: munin/drbd-plugin
|
src: munin/drbd-plugin
|
||||||
dest: /etc/munin/plugins/drbd
|
dest: /etc/munin/plugins/drbd
|
||||||
mode: "755"
|
mode: "755"
|
||||||
|
when: munin_plugins_dir.stat.exist
|
||||||
notify: restart munin-node
|
notify: restart munin-node
|
||||||
|
|
||||||
- name: Copy Munin plugin conf
|
- name: Copy Munin plugin conf
|
||||||
copy:
|
copy:
|
||||||
src: munin/drbd-config
|
src: munin/drbd-config
|
||||||
dest: /etc/munin/plugin-conf.d/drbd
|
dest: /etc/munin/plugin-conf.d/drbd
|
||||||
|
when: munin_plugins_dir.stat.exist
|
||||||
notify: restart munin-node
|
notify: restart munin-node
|
||||||
|
|
|
@ -1,8 +1,14 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
|
- name: Check if Nagios is installed
|
||||||
|
stat:
|
||||||
|
path: /usr/local/lib/nagios/plugins/
|
||||||
|
register: nagios_plugins_dir
|
||||||
|
|
||||||
- name: Mount /usr in rw
|
- name: Mount /usr in rw
|
||||||
command: mount -o remount,rw /usr warn=no
|
command: mount -o remount,rw /usr warn=no
|
||||||
changed_when: False
|
changed_when: False
|
||||||
|
when: nagios_plugins_dir.stat.exist
|
||||||
|
|
||||||
# https://exchange.nagios.org/components/com_mtree/attachment.php?link_id=3367&cf_id=30
|
# https://exchange.nagios.org/components/com_mtree/attachment.php?link_id=3367&cf_id=30
|
||||||
- name: Install Nagios plugin
|
- name: Install Nagios plugin
|
||||||
|
@ -10,3 +16,4 @@
|
||||||
src: "nagios/check_drbd"
|
src: "nagios/check_drbd"
|
||||||
dest: "/usr/local/lib/nagios/plugins/check_drbd"
|
dest: "/usr/local/lib/nagios/plugins/check_drbd"
|
||||||
mode: "755"
|
mode: "755"
|
||||||
|
when: nagios_plugins_dir.stat.exist
|
||||||
|
|
Loading…
Reference in a new issue