podman/systemd: relax the "until" condition
On slow systems, it's possible that systemd takes more time than usual
to execute a task from Ansible (e.g. service restart); so Ansible
doesn't have yet the registered facts from systemd.
To make sure that Ansible doesn't fail with:
dict object' has no attribute 'status'
We first check if status is defined.
Change-Id: Ie73cecc115c87fe452a90892755a1df5b3d894a7
Closes-Bug: #1877449
(cherry picked from commit 0c0f904ef5
)
This commit is contained in:
parent
5667a22780
commit
c8dc1a7829
|
@ -91,7 +91,7 @@
|
|||
loop_control:
|
||||
loop_var: container_sysd_name
|
||||
register: systemd_service_enable
|
||||
until: systemd_service_enable.status.Result == "success"
|
||||
until: (systemd_service_enable.status is defined) and (systemd_service_enable.status.Result == "success")
|
||||
retries: 5
|
||||
delay: 5
|
||||
|
||||
|
@ -108,7 +108,7 @@
|
|||
when:
|
||||
- not tripleo_container_manage_healthcheck_disabled
|
||||
register: systemd_healthcheck_enable
|
||||
until: systemd_healthcheck_enable.status.Result == "success"
|
||||
until: (systemd_healthcheck_enable.status is defined) and (systemd_healthcheck_enable.status.Result == "success")
|
||||
retries: 5
|
||||
delay: 5
|
||||
|
||||
|
|
Loading…
Reference in New Issue