issue #340: connection delegation used wrong variable name.

When inventory name did not match remote_addr, it would attempt to SSH
to the inventory name.
This commit is contained in:
David Wilson 2018-08-12 10:37:32 +01:00
parent 370b98f960
commit a1e653978b
1 changed files with 1 additions and 1 deletions

View File

@ -373,7 +373,7 @@ def config_from_hostvars(transport, inventory_name, connection,
config = config_from_play_context(transport, inventory_name, connection)
hostvars = dict(hostvars)
return dict(config, **{
'remote_addr': hostvars.get('ansible_hostname', inventory_name),
'remote_addr': hostvars.get('ansible_host', inventory_name),
'become': bool(become_user),
'become_user': become_user,
'become_pass': None,