Browse Source

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
tags/1.4.0
Emilien Macchi 2 months ago
parent
commit
0c0f904ef5
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      tripleo_ansible/roles/tripleo_container_manage/tasks/podman/systemd.yml

+ 1
- 1
tripleo_ansible/roles/tripleo_container_manage/tasks/podman/systemd.yml View File

@@ -60,6 +60,6 @@
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

Loading…
Cancel
Save