From 88dde70b5cb25591deca84f7269e41da77516466 Mon Sep 17 00:00:00 2001 From: Steven Robertson Date: Sun, 25 Oct 2020 16:51:39 -0700 Subject: [PATCH] need to specify strategy plugin for ansible ad-hoc --- .ci/debops_common_tests.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.ci/debops_common_tests.py b/.ci/debops_common_tests.py index 731f9b08..3e735c91 100755 --- a/.ci/debops_common_tests.py +++ b/.ci/debops_common_tests.py @@ -26,12 +26,14 @@ with ci_lib.Fold('job_setup'): ci_lib.run('debops-init %s', project_dir) os.chdir(project_dir) + ansible_strategy_plugin = "{}/ansible_mitogen/plugins/strategy".format(ci_lib.GIT_ROOT) + with open('.debops.cfg', 'w') as fp: fp.write( "[ansible defaults]\n" - "strategy_plugins = %s/ansible_mitogen/plugins/strategy\n" + "strategy_plugins = {}\n" "strategy = mitogen_linear\n" - % (ci_lib.GIT_ROOT,) + .format(ansible_strategy_plugin) ) with open(vars_path, 'w') as fp: @@ -65,7 +67,8 @@ with ci_lib.Fold('job_setup'): print() print("Setting up python-netaddr...") - ci_lib.run('ansible all -i {} -m apt -a "name=python-netaddr state=present" --become'.format(inventory_path)) + ci_lib.run('ANSIBLE_STRATEGY_PLUGINS={} ansible all -i {} -m apt -a "name=python-netaddr state=present" --become'.format( + ansible_strategy_plugin, inventory_path)) # Now we have real host key checking, we need to turn it off os.environ['ANSIBLE_HOST_KEY_CHECKING'] = 'False'