need to specify strategy plugin for ansible ad-hoc

pull/715/head
Steven Robertson 4 years ago
parent db5e7032c8
commit 88dde70b5c

@ -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'

Loading…
Cancel
Save