Add NRPE related configuration tasks
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
41e3fb0982
commit
22a19519b3
|
@ -2,6 +2,43 @@
|
||||||
apt:
|
apt:
|
||||||
pkg: keepalived
|
pkg: keepalived
|
||||||
state: present
|
state: present
|
||||||
|
tags:
|
||||||
|
- keepalived
|
||||||
|
|
||||||
|
- name: Add notify.sh script for NRPE check
|
||||||
|
file:
|
||||||
|
src: notify.sh
|
||||||
|
dest: /etc/keepalived/notify.sh
|
||||||
|
mode: "0755"
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
force: yes
|
||||||
|
notify: restart keepalived
|
||||||
|
tags:
|
||||||
|
- keepalived
|
||||||
|
- nrpe
|
||||||
|
|
||||||
|
- name: check_keepalived is installed
|
||||||
|
file:
|
||||||
|
src: check_keepalived
|
||||||
|
dest: /usr/local/lib/nagios/plugins/check_keepalived
|
||||||
|
mode: "0755"
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
force: yes
|
||||||
|
tags:
|
||||||
|
- keepalived
|
||||||
|
- nrpe
|
||||||
|
|
||||||
|
- name: Use check_keepalived for NRPE
|
||||||
|
lineinfile:
|
||||||
|
dest: /etc/nagios/nrpe.d/evolix.cfg
|
||||||
|
regexp: 'command\[check_keepalived\]'
|
||||||
|
replace: 'command[check_keepalived]=/usr/local/lib/nagios/plugins/check_keepalived'
|
||||||
|
notify: restart nagios-nrpe-server
|
||||||
|
tags:
|
||||||
|
- keepalived
|
||||||
|
- nrpe
|
||||||
|
|
||||||
- name: generate Keepalived configuration
|
- name: generate Keepalived configuration
|
||||||
template:
|
template:
|
||||||
|
@ -9,6 +46,8 @@
|
||||||
dest: /etc/keepalived/keepalived.conf
|
dest: /etc/keepalived/keepalived.conf
|
||||||
mode: 0644
|
mode: 0644
|
||||||
notify: restart keepalived
|
notify: restart keepalived
|
||||||
|
tags:
|
||||||
|
- keepalived
|
||||||
|
|
||||||
- name: enable and restart Keepalived service
|
- name: enable and restart Keepalived service
|
||||||
systemd:
|
systemd:
|
||||||
|
@ -16,3 +55,5 @@
|
||||||
daemon_reload: yes
|
daemon_reload: yes
|
||||||
state: started
|
state: started
|
||||||
enabled: yes
|
enabled: yes
|
||||||
|
tags:
|
||||||
|
- keepalived
|
||||||
|
|
Loading…
Reference in a new issue