forked from ISTI-ansible-roles/ansible-roles
Add a nagios NRPE handler to restart the tomcat instance when it dies.
This commit is contained in:
parent
0dc8227536
commit
defbf77503
|
@ -121,3 +121,10 @@
|
|||
service: name='tomcat-instance-{{ smartgears_http_port }}' state=restarted
|
||||
when: smartgears_force_restart is defined and smartgears_force_restart
|
||||
tags: [ 'smartgears', 'smartgears_conf', 'tomcat' ]
|
||||
|
||||
- name: Install the Nagios NRPE configuration for smartgears
|
||||
template: src=smartgears-nrpe.cfg.j2 dest=/etc/nagios/nrpe.d/smartgears-nrpe.cfg owner=root group=root mode=444
|
||||
notify: Reload NRPE server
|
||||
when: nagios_enabled
|
||||
tags: [ 'smartgears', 'smartgears_nrpe', 'nagios', 'nagios_nrpe' ]
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
|
||||
# Restart SmartGears (via handler)
|
||||
command[global_restart_smartgears]=/usr/bin/sudo /etc/init.d/tomcat-instance-{{ smartgears_http_port }} start
|
||||
|
Loading…
Reference in New Issue