diff options
author | Peter Sprygada <privateip@users.noreply.github.com> | 2016-02-23 14:14:20 -0500 |
---|---|---|
committer | Peter Sprygada <psprygada@ansible.com> | 2016-02-23 14:20:49 -0500 |
commit | d70fd17cf9f1a80bf15abb7cfb120aa50d18b60c (patch) | |
tree | 1051345e6a98861da18a310f5f6ebb2a8cd18a41 | |
parent | 5d5abbb898c5b16e78b9234a3768d849e87d0858 (diff) | |
download | ansible-d70fd17cf9f1a80bf15abb7cfb120aa50d18b60c.tar.gz |
Merge pull request #14618 from ogenstad/devel
Fixes authentication error bug when user has rsa keys
-rw-r--r-- | lib/ansible/module_utils/shell.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/ansible/module_utils/shell.py b/lib/ansible/module_utils/shell.py index 60e6830199..f0dfce72d6 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): + 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()) @@ -96,8 +97,8 @@ class Shell(object): use_keys = password is None self.ssh.connect(host, port=port, username=username, password=password, - timeout=timeout, allow_agent=use_keys, look_for_keys=use_keys, - key_filename=key_filename) + timeout=timeout, look_for_keys=look_for_keys, pkey=pkey, + key_filename=key_filename, allow_agent=allow_agent) self.shell = self.ssh.invoke_shell() self.shell.settimeout(10) @@ -196,4 +197,3 @@ def get_cli_connection(module): module.fail_json(msg='socket timed out') return cli - |