Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
When using CLI options in the command parameter of the podman_container module that matche podman CLI arguments then this breaks idempotency.
For instance, using -p 8080 in the command parameter will recreate the container after the initial execution rather than keeping it as is (ie: no changes) because -p 8080 will be interpreted as publishing port 8080 for podman.
Note that this doesn't apply the podman option to the container but this is only used for idempotency purpose when trying to inspect the existing container and create a diff.
Steps to reproduce the issue:
Create a container via the podman_container module and use -p or -c options (others will probably work too)
Rerun the same task
Describe the results you received:
Container is recreated after the second playbook execution.
Describe the results you expected:
Container shouldn't be recreate if nothing changed
Additional information you deem important (e.g. issue happens only occasionally):
Version of the containers.podman collection:Either git commit if installed from git: git show --summaryOr version from ansible-galaxy if installed from galaxy: ansible-galaxy collection list | grep containers.podman
Collection Version
----------------- -------
containers.podman 1.15.3
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
When using CLI options in the command parameter of the
podman_container
module that matche podman CLI arguments then this breaks idempotency. For instance, using-p 8080
in the command parameter will recreate the container after the initial execution rather than keeping it as is (ie: no changes) because-p 8080
will be interpreted as publishing port 8080 for podman. Note that this doesn't apply the podman option to the container but this is only used for idempotency purpose when trying to inspect the existing container and create a diff.Steps to reproduce the issue:
Create a container via the
podman_container
module and use -p or -c options (others will probably work too)Rerun the same task
Describe the results you received:
Container is recreated after the second playbook execution.
Describe the results you expected:
Container shouldn't be recreate if nothing changed
Additional information you deem important (e.g. issue happens only occasionally):
Version of the
containers.podman
collection: Either git commit if installed from git:git show --summary
Or version fromansible-galaxy
if installed from galaxy:ansible-galaxy collection list | grep containers.podman
Output of
ansible --version
:Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Playbok you run with ansible (e.g. content of
playbook.yaml
):Command line and output of ansible run with high verbosity
Please NOTE: if you submit a bug about idempotency, run the playbook with
--diff
option, like:ansible-playbook -i inventory --diff -vv playbook.yml
Trying with
-c /foo.yml
instead of-p 8080
will produce something likeAdditional environment details (AWS, VirtualBox, physical, etc.):