For completeness sake (and because I looked for it and did not find
it), this adds a docstring line for the "use_container_id" parameter.
Signed-off-by: Cleber Rosa <crosa@redhat.com>
In podman connection when we copy file to container and work as
non-root user, need to set correct ownership for the files.
Since ansible change https://github.com/ansible/ansible/pull/70221
it's broken, because of new permissions ansible set to copied files.
Workaround for issue https://github.com/containers/libpod/issues/6856
When podman runs with CGroups v2 and rootless container,
it mounts directory without error, but mounted directory is empty.
Add check for the directory if it's empty.
* Add user flags before container id in podman exec
When user provides an ansible_ssh_user, podman connection
plugin includes this values as `--user` flag. This patch
fixes the location of this flag according to podman exec command help.
Fixes: ansible/ansible#65220
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Don't use mount in case of specified user
Co-authored-by: Sagi Shnaidman <sshnaidm@redhat.com>