mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 22:00:22 -07:00
Makes host key checking the default behavior but can be disabled in ansible.cfg or by environment variable.
This commit is contained in:
parent
4407ca8031
commit
9db4f7a9a6
5 changed files with 117 additions and 11 deletions
|
@ -53,7 +53,10 @@ class Connection(object):
|
|||
self.common_args += ["-o", "ControlMaster=auto",
|
||||
"-o", "ControlPersist=60s",
|
||||
"-o", "ControlPath=/tmp/ansible-ssh-%h-%p-%r"]
|
||||
self.common_args += ["-o", "StrictHostKeyChecking=no"]
|
||||
|
||||
if not C.HOST_KEY_CHECKING:
|
||||
self.common_args += ["-o", "StrictHostKeyChecking=no"]
|
||||
|
||||
if self.port is not None:
|
||||
self.common_args += ["-o", "Port=%d" % (self.port)]
|
||||
if self.private_key_file is not None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue