Skip to content

Commit

Permalink
Fix idempotency when using 0.0.0.0 in ports (#679)
Browse files Browse the repository at this point in the history
Fix #678
Signed-off-by: Sagi Shnaidman <[email protected]>
  • Loading branch information
sshnaidm authored Nov 30, 2023
1 parent 821fe26 commit 2d00639
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/module_utils/podman/podman_container_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 2d00639

Please sign in to comment.