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.
pull/350/head
David Wilson 6 years ago
parent 370b98f960
commit a1e653978b

@ -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,

Loading…
Cancel
Save