diff --git a/lib/ansible/module_utils/shell.py b/lib/ansible/module_utils/shell.py index 9a63c9821d2..b9e798603c7 100644 --- a/lib/ansible/module_utils/shell.py +++ b/lib/ansible/module_utils/shell.py @@ -88,7 +88,8 @@ class Shell(object): self.errors.extend(CLI_ERRORS_RE) def open(self, host, port=22, username=None, password=None, - timeout=10, key_filename=None, pkey=None, look_for_keys=None): + timeout=10, key_filename=None, pkey=None, look_for_keys=None, + allow_agent=False): self.ssh = paramiko.SSHClient() self.ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) @@ -100,7 +101,7 @@ class Shell(object): self.ssh.connect(host, port=port, username=username, password=password, timeout=timeout, look_for_keys=look_for_keys, pkey=pkey, - key_filename=key_filename) + key_filename=key_filename, allow_agent=allow_agent) self.shell = self.ssh.invoke_shell() self.shell.settimeout(10) @@ -199,4 +200,3 @@ def get_cli_connection(module): module.fail_json(msg='socket timed out') return cli -