improve host key checking configurability

see: https://github.com/ansible/tower/issues/3737
This commit is contained in:
Ryan Petrello
2019-09-30 12:26:30 -04:00
parent d2a5af44de
commit 82be87566f
5 changed files with 20 additions and 1 deletions

View File

@@ -33,6 +33,7 @@ class Command(BaseCommand):
]):
ssh_key = settings.AWX_ISOLATED_PRIVATE_KEY
env = dict(os.environ.items())
env['ANSIBLE_HOST_KEY_CHECKING'] = str(settings.AWX_ISOLATED_HOST_KEY_CHECKING)
set_pythonpath(os.path.join(settings.ANSIBLE_VENV_PATH, 'lib'), env)
res = ansible_runner.interface.run(
private_data_dir=path,