forked from evolix/ansible-roles
sudo without password for nagios
This commit is contained in:
parent
d05897fe93
commit
c6cba6d9e0
|
@ -43,6 +43,18 @@
|
||||||
- redis
|
- redis
|
||||||
- nrpe
|
- nrpe
|
||||||
|
|
||||||
|
- name: sudo without password for nagios
|
||||||
|
lineinfile:
|
||||||
|
dest: /etc/sudoers.d/evolinux
|
||||||
|
regexp: 'check_redis$'
|
||||||
|
line: 'nagios ALL = NOPASSWD: {{ redis_check_redis_path }}'
|
||||||
|
insertafter: '^nagios'
|
||||||
|
validate: "visudo -cf %s"
|
||||||
|
when: redis_instance_name is defined
|
||||||
|
tags:
|
||||||
|
- redis
|
||||||
|
- nrpe
|
||||||
|
|
||||||
- name: Use check_redis for NRPE
|
- name: Use check_redis for NRPE
|
||||||
replace:
|
replace:
|
||||||
dest: /etc/nagios/nrpe.d/evolix.cfg
|
dest: /etc/nagios/nrpe.d/evolix.cfg
|
||||||
|
@ -77,3 +89,15 @@
|
||||||
tags:
|
tags:
|
||||||
- redis
|
- redis
|
||||||
- nrpe
|
- nrpe
|
||||||
|
|
||||||
|
- name: sudo without password for nagios
|
||||||
|
lineinfile:
|
||||||
|
dest: /etc/sudoers.d/evolinux
|
||||||
|
regexp: 'check_redis_instances$'
|
||||||
|
line: 'nagios ALL = NOPASSWD: /usr/local/lib/nagios/plugins/check_redis_instances'
|
||||||
|
insertafter: '^nagios'
|
||||||
|
validate: "visudo -cf %s"
|
||||||
|
when: redis_instance_name is defined
|
||||||
|
tags:
|
||||||
|
- redis
|
||||||
|
- nrpe
|
||||||
|
|
Loading…
Reference in a new issue