mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
Merge pull request #8736 from ericdwhite/issue-8735-Trim-docker-module-expose-items
module docker - expose will fail to port forward network connections if there are spaces in the CSV value
This commit is contained in:
@@ -450,6 +450,7 @@ class DockerManager:
|
|||||||
if expose_list:
|
if expose_list:
|
||||||
exposed = []
|
exposed = []
|
||||||
for port in expose_list:
|
for port in expose_list:
|
||||||
|
port = port.strip()
|
||||||
if port.endswith('/tcp') or port.endswith('/udp'):
|
if port.endswith('/tcp') or port.endswith('/udp'):
|
||||||
port_with_proto = tuple(port.split('/'))
|
port_with_proto = tuple(port.split('/'))
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user