From 54c50cc983983f39812740704fa3992555b7cc0f Mon Sep 17 00:00:00 2001 From: Gaige B Paulsen Date: Fri, 18 Aug 2017 14:04:30 -0400 Subject: [PATCH] netconfig module updated to pay attention to .ssh/config (#23876) --- lib/ansible/plugins/connection/netconf.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/ansible/plugins/connection/netconf.py b/lib/ansible/plugins/connection/netconf.py index 55d87e5d073..2445552644f 100644 --- a/lib/ansible/plugins/connection/netconf.py +++ b/lib/ansible/plugins/connection/netconf.py @@ -85,6 +85,10 @@ class Connection(Rpc, ConnectionBase): if not network_os: raise AnsibleConnectionFailure('Unable to automatically determine host network os. Please ansible_network_os value') + ssh_config = os.getenv('ANSIBLE_NETCONF_SSH_CONFIG', False) + if ssh_config == 'True': + ssh_config = True + try: self._manager = manager.connect( host=self._play_context.remote_addr, @@ -96,7 +100,8 @@ class Connection(Rpc, ConnectionBase): look_for_keys=C.PARAMIKO_LOOK_FOR_KEYS, allow_agent=self.allow_agent, timeout=self._play_context.timeout, - device_params={'name': network_os} + device_params={'name': network_os}, + ssh_config=ssh_config ) except SSHUnknownHostError as exc: raise AnsibleConnectionFailure(str(exc))