Miscellaneous ansible-test updates. (#27937)

* Add keep alives to ansible-test ssh delegation.
* Improve ansible-test JSON parsing error messages.
* Increase ansible-test delegation sleep and retry.
* Update ansible-test to recognize .psm1 files.
This commit is contained in:
Matt Clay 2017-08-08 22:55:17 -07:00 committed by GitHub
parent 875c8e4f3e
commit a40cb5a47f
4 changed files with 24 additions and 9 deletions

View file

@ -110,7 +110,18 @@ class ManagePosixCI(object):
:type core_ci: AnsibleCoreCI
"""
self.core_ci = core_ci
self.ssh_args = ['-o', 'BatchMode=yes', '-o', 'StrictHostKeyChecking=no', '-i', self.core_ci.ssh_key.key]
self.ssh_args = ['-i', self.core_ci.ssh_key.key]
ssh_options = dict(
BatchMode='yes',
StrictHostKeyChecking='no',
UserKnownHostsFile='/dev/null',
ServerAliveInterval=15,
ServerAliveCountMax=4,
)
for ssh_option in sorted(ssh_options):
self.ssh_args += ['-o', '%s=%s' % (ssh_option, ssh_options[ssh_option])]
if self.core_ci.platform == 'freebsd':
self.become = ['su', '-l', 'root', '-c']