mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-02 16:53:11 +00:00
committed by
James Cammarata
parent
f8bf9cdeec
commit
0f91add86f
@@ -94,8 +94,7 @@ class Connection(object):
|
|||||||
self.common_args += ["-o", "KbdInteractiveAuthentication=no",
|
self.common_args += ["-o", "KbdInteractiveAuthentication=no",
|
||||||
"-o", "PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey",
|
"-o", "PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey",
|
||||||
"-o", "PasswordAuthentication=no"]
|
"-o", "PasswordAuthentication=no"]
|
||||||
if self.user != pwd.getpwuid(os.geteuid())[0]:
|
self.common_args += ["-o", "User=" + (self.user or self.user or pwd.getpwuid(os.geteuid())[0])]
|
||||||
self.common_args += ["-o", "User="+self.user]
|
|
||||||
self.common_args += ["-o", "ConnectTimeout=%d" % self.runner.timeout]
|
self.common_args += ["-o", "ConnectTimeout=%d" % self.runner.timeout]
|
||||||
|
|
||||||
return self
|
return self
|
||||||
|
|||||||
Reference in New Issue
Block a user