From a1e653978be38e677db8acf31f439eb8daeee7aa Mon Sep 17 00:00:00 2001 From: David Wilson Date: Sun, 12 Aug 2018 10:37:32 +0100 Subject: [PATCH] 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. --- ansible_mitogen/connection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible_mitogen/connection.py b/ansible_mitogen/connection.py index 0823736f..7099c1a2 100644 --- a/ansible_mitogen/connection.py +++ b/ansible_mitogen/connection.py @@ -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,