library/roles/orientdb: Add a nagios handler to restart the service after it dies. See https://support.d4science.org/issues/8858

This commit is contained in:
Andrea Dell'Amico 2017-06-27 20:01:24 +02:00
parent 52cacc0267
commit 1fd205a383
2 changed files with 11 additions and 0 deletions

View File

@ -64,6 +64,14 @@
notify: Restart orientdb
tags: [ 'orientdb', 'orientdb_config' ]
- name: Install the nagios nrpe configuration
template: src=orientdb-nrpe.cfg.j2 dest={{ nrpe_include_dir }}/orientdb-nrpe.cfg owner=root group=root mode=0444
notify: Reload NRPE server
when:
- nrpe_include_dir is defined
- nagios_enabled is defined and nagios_enabled
tags: [ 'orientdb', 'orientdb_nagios' ]
- name: Ensure that the service is enabled and running
service: name=orientdb state=started enabled=yes
when: orientdb_enabled

View File

@ -0,0 +1,3 @@
# Restart orientdb (via handler)
command[global_restart_orientdb]=/usr/bin/sudo /etc/init.d/orientdb restart