Modify icinga-client role to add some systemd options

This commit is contained in:
staticsafe 2019-02-03 13:11:18 -05:00
parent aa14f2f64f
commit 279b4e10f0
2 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,2 @@
[Service]
Restart=on-failure

View File

@ -10,7 +10,16 @@
with_items: with_items:
- icinga2 - icinga2
- monitoring-plugins - monitoring-plugins
- name: Ensure icinga2 systemd folder exists
file:
path: /etc/systemd/system/icinga2.service.d/
state: directory
- name: Copy custom icinga2 systemd service file modifications
copy:
src: restart.conf
dest: /etc/systemd/system/icinga2.service.d/restart.conf
- name: Ensure that icinga2 systemd service is enabled - name: Ensure that icinga2 systemd service is enabled
systemd: systemd:
name: icinga2 name: icinga2
enabled: yes enabled: yes
daemon_reload: yes