tripleo-container-manage: add task to start systemd healthcheck service

It seems like the healthcheck timer is started but sometimes not the
healthcheck service. Let's make sure it's properly started as well.

Change-Id: Ic73ad9cf3ea13ad485458a2d7c9d84690fe51d09
This commit is contained in:
Emilien Macchi 2019-11-08 14:17:08 +01:00
parent 94d52bc00f
commit cb4b443f6e
1 changed files with 10 additions and 1 deletions

View File

@ -66,7 +66,7 @@
owner: root
group: root
register: systemd_timer
- name: "Enable and start systemd timer for {{ container_name }}"
- name: "Enable and start systemd healthcheck timer for {{ container_name }}"
systemd:
# Restart the timer if it was already running
state: restarted
@ -75,3 +75,12 @@
daemon_reload: true
when:
- systemd_healthcheck.changed or systemd_timer.changed
- name: "Enable and start systemd healthcheck service for {{ container_name }}"
systemd:
# Restart the service if it was already running
state: restarted
name: "tripleo_{{ container_name }}_healthcheck.service"
enabled: true
daemon_reload: true
when:
- systemd_healthcheck.changed or systemd_timer.changed