mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Use default port if ansible_ssh_port is not set for the delegated node
Also add testcase for it.
This commit is contained in:
@@ -384,6 +384,7 @@ class Runner(object):
|
||||
interpreters.append(i)
|
||||
for i in interpreters:
|
||||
del inject[i]
|
||||
port = C.DEFAULT_REMOTE_PORT
|
||||
try:
|
||||
delegate_info = inject['hostvars'][delegate_to]
|
||||
actual_host = delegate_info.get('ansible_ssh_host', delegate_to)
|
||||
@@ -393,6 +394,7 @@ class Runner(object):
|
||||
inject[i] = delegate_info[i]
|
||||
except errors.AnsibleError:
|
||||
actual_host = delegate_to
|
||||
actual_port = port
|
||||
|
||||
try:
|
||||
if actual_port is not None:
|
||||
|
||||
Reference in New Issue
Block a user