Skip to content
This repository has been archived by the owner on Jan 8, 2023. It is now read-only.

Fix the waiting for a rootfull container creation #83

Merged
merged 4 commits into from
Nov 2, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/molecule_podman/playbooks/create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@
changed_when: true

- name: Wait for instance(s) creation to complete
become: "{{ not item.item.rootless | default(omit) }}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I may be the ignorant here but my impression was that become was supposed to be used on looped command and not on the async_status, which I doubt it really needs root access to check already running tasks.

async_status:
jid: "{{ item.ansible_job_id }}"
register: podman_jobs
Expand Down
5 changes: 3 additions & 2 deletions src/molecule_podman/playbooks/destroy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
changed_when: true

- name: Wait for instance(s) deletion to complete
become: "{{ not item.item.rootless | default(omit) }}"
async_status:
jid: "{{ item.ansible_job_id }}"
register: docker_jobs
until: docker_jobs.finished
register: podman_jobs
until: podman_jobs.finished
retries: 300
with_items: "{{ server.results }}"