Pass inventory file to ansible-runner

It is possible for our windmill-config directory to have another
inventory file. In an effort to stop ansible from picking more then one,
we can force the inventory we want.

Change-Id: Iaf543f0fea3a2f247205b382e86af61d1c321aa4
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2019-03-19 22:10:33 -04:00
parent 32334f78db
commit 9000c5a8c2
1 changed files with 2 additions and 2 deletions

View File

@ -100,8 +100,8 @@ def bootstrap_server(server, key, name, group, keep, timeout):
SCRIPT_DIR, '..', 'playbooks', 'bootstrap-ansible')
r = ansible_runner.run(
private_data_dir=runner.root, playbook='site.yaml',
project_dir=project_dir)
inventory=runner.hosts, private_data_dir=runner.root,
playbook='site.yaml', project_dir=project_dir)
if r.rc:
raise Exception("Ansible runner failed")