2015-05-28 11:32:57 +02:00
|
|
|
---
|
2016-02-10 12:57:15 +01:00
|
|
|
# We do not use the check_linux_raid plugin anymore. Now the check_raid one is much better.
|
2015-05-28 11:32:57 +02:00
|
|
|
- name: Install some plugins that check hardware parts
|
|
|
|
copy: src={{ item }} dest={{ nagios_isti_plugdir }}/{{ item }} owner=root group=nagios mode=0750
|
|
|
|
with_items:
|
|
|
|
- check_smart
|
|
|
|
tags:
|
|
|
|
- nagios-hw
|
|
|
|
- nagios
|
|
|
|
|
|
|
|
- name: Install some packages needed by the hardware checks
|
2018-08-09 18:52:55 +02:00
|
|
|
apt: pkg={{ item }} state=present
|
2015-05-28 11:32:57 +02:00
|
|
|
with_items:
|
|
|
|
- smartmontools
|
|
|
|
tags:
|
|
|
|
- nagios-hw
|
|
|
|
- nagios
|
|
|
|
|
|
|
|
- name: Configure the smart server to run
|
|
|
|
lineinfile: name=/etc/default/smartmontools regexp="^start_smartd=" line="start_smartd=yes"
|
|
|
|
tags:
|
|
|
|
- nagios-hw
|
|
|
|
- nagios
|
|
|
|
|
|
|
|
- name: Ensure that the smart server is enabled and running
|
|
|
|
service: name=smartmontools state=started enabled=yes
|
2015-08-07 18:20:09 +02:00
|
|
|
when: not is_debian8
|
2015-05-28 11:32:57 +02:00
|
|
|
tags:
|
|
|
|
- nagios-hw
|
|
|
|
- nagios
|
|
|
|
|
|
|
|
- name: Configure NRPE to allow arguments. Needed by the check_smart plugin
|
|
|
|
lineinfile: name=/etc/nagios/nrpe.cfg regexp="^dont_blame_nrpe=" line="dont_blame_nrpe=0"
|
|
|
|
notify: Restart NRPE server
|
|
|
|
tags:
|
|
|
|
- nagios-hw
|
|
|
|
- nagios
|
|
|
|
- nrpe
|
|
|
|
|
|
|
|
- name: nagios needs root to execute some hardware checks. We do it via sudo
|
|
|
|
template: src=nagios-hw.sudoers.j2 dest=/etc/sudoers.d/nagios-hw owner=root group=root mode=0440
|
|
|
|
tags:
|
|
|
|
- nagios-hw
|
|
|
|
- nagios
|
|
|
|
- nrpe
|