|
|
|
@ -67,6 +67,7 @@ import ansible.utils.shlex
|
|
|
|
|
import ansible.constants as C
|
|
|
|
|
|
|
|
|
|
from ansible.module_utils.six import with_metaclass
|
|
|
|
|
from ansible.module_utils.parsing.convert_bool import boolean
|
|
|
|
|
|
|
|
|
|
# this was added in Ansible >= 2.8.0; fallback to the default interpreter if necessary
|
|
|
|
|
try:
|
|
|
|
@ -386,7 +387,7 @@ class Spec(with_metaclass(abc.ABCMeta, object)):
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
@abc.abstractmethod
|
|
|
|
|
def mitogen_ssh_host_key_checking(self):
|
|
|
|
|
def ansible_ssh_host_key_checking(self):
|
|
|
|
|
"""
|
|
|
|
|
Whether or not to check the ssh hostkeys
|
|
|
|
|
"""
|
|
|
|
@ -570,8 +571,15 @@ class PlayContextSpec(Spec):
|
|
|
|
|
def mitogen_ssh_compression(self):
|
|
|
|
|
return self._connection.get_task_var('mitogen_ssh_compression')
|
|
|
|
|
|
|
|
|
|
def mitogen_ssh_host_key_checking(self):
|
|
|
|
|
return self._connection.get_task_var('mitogen_ssh_host_key_checking')
|
|
|
|
|
def ansible_ssh_host_key_checking(self):
|
|
|
|
|
tmp = [boolean(x) for x in list(
|
|
|
|
|
filter(lambda x:x is not None, (
|
|
|
|
|
self._connection.get_task_var('ansible_ssh_host_key_checking'),
|
|
|
|
|
self._connection.get_task_var('ansible_host_key_checking')
|
|
|
|
|
)))]
|
|
|
|
|
if not tmp:
|
|
|
|
|
return None
|
|
|
|
|
return any(tmp)
|
|
|
|
|
|
|
|
|
|
def extra_args(self):
|
|
|
|
|
return self._connection.get_extra_args()
|
|
|
|
|