From 76cd7cadfea63fd9b5e89cac046cee406382eade Mon Sep 17 00:00:00 2001 From: Mike Bryant Date: Fri, 6 May 2016 17:56:15 +0100 Subject: [PATCH] Allow ssh agent usage for junos_netconf By default the `Shell` class disables ssh agents. The `junos_netconf` module uses this class, but doesn't re-enable agents. Here it's explicitly enabled again, so an ssh agent can be used to connect to and configure Junos devices. --- lib/ansible/module_utils/junos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/module_utils/junos.py b/lib/ansible/module_utils/junos.py index bf1a2f955d5..0f2f5ea1b49 100644 --- a/lib/ansible/module_utils/junos.py +++ b/lib/ansible/module_utils/junos.py @@ -95,7 +95,7 @@ class Cli(object): try: self.shell = Shell() - self.shell.open(host, port=port, username=username, password=password, key_filename=key_filename) + self.shell.open(host, port=port, username=username, password=password, key_filename=key_filename, allow_agent=True) except ShellError: e = get_exception() msg = 'failed to connect to %s:%s - %s' % (host, port, str(e))