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

Fix issue with podman and exposed ports (#323)

This commit is contained in:
Sergey 2021-10-12 02:18:08 +03:00 committed by GitHub
parent a1aec061f5
commit 717963d66d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1120,8 +1120,9 @@ class PodmanContainerDiff:
ports = self.info['hostconfig']['portbindings']
before = []
for port, hosts in ports.items():
for h in hosts:
before.append(compose(port, h))
if hosts:
for h in hosts:
before.append(compose(port, h))
after = self.params['publish'] or []
if self.params['publish_all']:
image_ports = self.image_info['config'].get('exposedports', {})