Jérémy Dubois
4ef630285d
Script to check if connections are UP, and if so, check whether main connection is correctly used. Also add configuration to use with nrpe and sudo.
31 lines
934 B
YAML
31 lines
934 B
YAML
---
|
|
# dont't break the tab!
|
|
- name: Allow wheel group to run command as root in sudo
|
|
lineinfile:
|
|
dest: /etc/sudoers
|
|
insertafter: '# and set environment variables.'
|
|
line: '%wheel ALL=(ALL) SETENV: ALL'
|
|
validate: 'visudo -cf %s'
|
|
backup: no
|
|
tags:
|
|
- sudo
|
|
|
|
- name: Configure sudoers for evomaintenance and monitoring
|
|
blockinfile:
|
|
state: present
|
|
dest: /etc/sudoers
|
|
insertafter: EOF
|
|
block: |
|
|
Cmnd_Alias MAINT = /usr/share/scripts/evomaintenance.sh
|
|
%wheel ALL=NOPASSWD: MAINT
|
|
_nrpe ALL=(root) NOPASSWD: /usr/local/libexec/nagios/plugins/check_ipsecctl.sh
|
|
_nrpe ALL=(root) NOPASSWD: /usr/local/libexec/nagios/check_mailq
|
|
_nrpe ALL=(root) NOPASSWD: /usr/local/libexec/nagios/plugins/check_ospfd_simple
|
|
_nrpe ALL=(root) NOPASSWD: /usr/local/libexec/nagios/plugins/check_connections_state.sh
|
|
validate: 'visudo -cf %s'
|
|
backup: no
|
|
tags:
|
|
- sudo
|
|
|
|
|