diff --git a/plugins/module_utils/podman/podman_container_lib.py b/plugins/module_utils/podman/podman_container_lib.py index e317e2f1..33530fd3 100644 --- a/plugins/module_utils/podman/podman_container_lib.py +++ b/plugins/module_utils/podman/podman_container_lib.py @@ -1187,7 +1187,7 @@ def compose(p, h): if image_ports: after += list(image_ports.keys()) after = [ - i.replace("/tcp", "").replace("[", "").replace("]", "") + i.replace("/tcp", "").replace("[", "").replace("]", "").replace("0.0.0.0:", "") for i in after] # No support for port ranges yet for ports in after: diff --git a/tests/integration/targets/podman_container_idempotency/tasks/idem_ports.yml b/tests/integration/targets/podman_container_idempotency/tasks/idem_ports.yml index 54a667c8..81b7baf0 100644 --- a/tests/integration/targets/podman_container_idempotency/tasks/idem_ports.yml +++ b/tests/integration/targets/podman_container_idempotency/tasks/idem_ports.yml @@ -40,6 +40,7 @@ - "127.0.0.1:43423:8872" - "127.0.0.2:43423:8872/tcp" - "127.0.0.3:43423:8872" + - "0.0.0.0:15674:7846" register: test2 - name: check test2 @@ -63,6 +64,7 @@ - "127.0.0.1:43423:8872" - "127.0.0.2:43423:8872/tcp" - "127.0.0.3:43423:8872" + - "0.0.0.0:15674:7846" register: test3 - name: check test3