1
0
Fork 0
mirror of https://github.com/containers/ansible-podman-collections.git synced 2026-02-04 07:11:49 +00:00

Fix idempotency when using 0.0.0.0 in ports

Fix #678
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
This commit is contained in:
Sagi Shnaidman 2023-11-30 13:47:03 +02:00
parent 821fe265eb
commit e29af6bb77
2 changed files with 3 additions and 1 deletions

View file

@ -1187,7 +1187,7 @@ class PodmanContainerDiff:
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:

View file

@ -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