1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge pull request #4208 from ashorin/dynamic-port

Allow for dynamic accelerate_port: and port: in plays
This commit is contained in:
Michael DeHaan 2013-09-23 04:32:48 -07:00
commit cb200b0768

View file

@ -624,7 +624,7 @@ class Runner(object):
# calls just to accomodate this one case
actual_port = [actual_port, self.accelerate_port]
elif actual_port is not None:
actual_port = int(actual_port)
actual_port = int(template.template(self.basedir, actual_port, inject))
except ValueError, e:
result = dict(failed=True, msg="FAILED: Configured port \"%s\" is not a valid port, expected integer" % actual_port)
return ReturnData(host=host, comm_ok=False, result=result)