mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Re-introduce ssh connection private key support
This commit is contained in:
parent
0826106441
commit
6a97e49a06
1 changed files with 2 additions and 5 deletions
|
@ -95,11 +95,8 @@ class Connection(ConnectionBase):
|
|||
|
||||
if self._connection_info.port is not None:
|
||||
self._common_args += ("-o", "Port={0}".format(self._connection_info.port))
|
||||
# FIXME: need to get this from connection info
|
||||
#if self.private_key_file is not None:
|
||||
# self._common_args += ("-o", "IdentityFile=\"{0}\"".format(os.path.expanduser(self.private_key_file)))
|
||||
#elif self.runner.private_key_file is not None:
|
||||
# self._common_args += ("-o", "IdentityFile=\"{0}\"".format(os.path.expanduser(self.runner.private_key_file)))
|
||||
if self._connection_info.private_key_file is not None:
|
||||
self._common_args += ("-o", "IdentityFile=\"{0}\"".format(os.path.expanduser(self._connection_info.private_key_file)))
|
||||
if self._connection_info.password:
|
||||
self._common_args += ("-o", "GSSAPIAuthentication=no",
|
||||
"-o", "PubkeyAuthentication=no")
|
||||
|
|
Loading…
Reference in a new issue