Fixes templating of ansible_ssh_host for delegates
This commit is contained in:
parent
956eb91de0
commit
9833263417
1 changed files with 5 additions and 2 deletions
|
@ -306,7 +306,7 @@ class Runner(object):
|
|||
|
||||
delegate = {}
|
||||
|
||||
# allow ansible_ssh_host to be templated
|
||||
# allow delegated host to be templated
|
||||
delegate['host'] = template.template(self.basedir, host,
|
||||
remote_inject, fail_on_undefined=True)
|
||||
|
||||
|
@ -331,7 +331,10 @@ class Runner(object):
|
|||
this_info = {}
|
||||
|
||||
# get the real ssh_address for the delegate
|
||||
delegate['ssh_host'] = this_info.get('ansible_ssh_host', delegate['host'])
|
||||
# and allow ansible_ssh_host to be templated
|
||||
delegate['ssh_host'] = template.template(self.basedir,
|
||||
this_info.get('ansible_ssh_host', this_host),
|
||||
this_info, fail_on_undefined=True)
|
||||
|
||||
delegate['port'] = this_info.get('ansible_ssh_port', port)
|
||||
|
||||
|
|
Loading…
Reference in a new issue