Fixes templating of ansible_ssh_host for delegates

release1.5.1
Serge van Ginderachter 11 years ago committed by James Cammarata
parent 53788e4c98
commit c85081e9a9

@ -308,7 +308,7 @@ class Runner(object):
delegate = {} delegate = {}
# allow ansible_ssh_host to be templated # allow delegated host to be templated
delegate['host'] = template.template(self.basedir, host, delegate['host'] = template.template(self.basedir, host,
remote_inject, fail_on_undefined=True) remote_inject, fail_on_undefined=True)
@ -333,7 +333,10 @@ class Runner(object):
this_info = {} this_info = {}
# get the real ssh_address for the delegate # 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) delegate['port'] = this_info.get('ansible_ssh_port', port)

Loading…
Cancel
Save