-
Notifications
You must be signed in to change notification settings - Fork 26
Fix the waiting for a rootfull container creation #83
Conversation
@@ -178,6 +178,7 @@ | |||
changed_when: true | |||
|
|||
- name: Wait for instance(s) creation to complete | |||
become: "{{ not item.item.rootless | default(omit) }}" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not get any reply on my original question. If that becomes still for very long, I will need to close it.
I'm sorry for the late reply, I did not catch the github notification. I understand that my last explanation was too brief and unclear. I'll try to expose why I think the The bug (tested from ansible-community/molecule-podman:main)Here is an execution of a
This execution is failing with the error message: You see that for the /bin/sh -c 'sudo -H -S -p "[sudo via ansible, key=sffbhxyqozulkfvnvkbfxjrhwervrjze] password:" -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-sffbhxyqozulkfvnvkbfxjrhwervrjze ; ANSIBLE_ASYNC_DIR='"'"'"'"'"'"'"'"'~/.ansible_async'"'"'"'"'"'"'"'"' /usr/bin/python /home/tristan/.ansible/tmp/ansible-tmp-1635665533.767641-32637-252596935354781/async_wrapper.py 339676911481 7200 /home/tristan/.ansible/tmp/ansible-tmp-1635665533.767641-32637-252596935354781/AnsiballZ_command.py _'"'"' && sleep 0' And the "results_file": "/root/.ansible_async/339676911481.32650" However, the "module_args": {
"_async_dir": "/home/tristan/.ansible_async",
"jid": "339676911481.32650",
"mode": "status"
} But during this task execution, the item (from the The fix (tested from 0b11stan/molecule-podman:fix/wait-rootfull)That's why in my fix, I'm explicitly saying to the Here is an execution of a
You can see that now the "module_args": {
"_async_dir": "/root/.ansible_async",
"jid": "954204873193.53278",
"mode": "status"
} Because the Resulting in a successfull execution. I hope it's answering your question and that I did not miss anything. However, I'm not an expert in how |
It's a fix for #77.
You can try it with the following:
However, the
converge
step for rootfull containers is still not working, I'll create a new issue for that.