From 0dfcf5560b4392db72877319aeb4fa985f0ddc73 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Tue, 12 Feb 2019 00:08:02 +0000 Subject: [PATCH] tests: define MITOGEN_INVENTORY_FILE even if -i unspecified. To fix running tests locally. --- tests/ansible/run_ansible_playbook.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/ansible/run_ansible_playbook.py b/tests/ansible/run_ansible_playbook.py index 51f864f4..b5b459a1 100755 --- a/tests/ansible/run_ansible_playbook.py +++ b/tests/ansible/run_ansible_playbook.py @@ -46,6 +46,10 @@ if '-i' in sys.argv: extra['MITOGEN_INVENTORY_FILE'] = ( os.path.abspath(sys.argv[1 + sys.argv.index('-i')]) ) +else: + extra['MITOGEN_INVENTORY_FILE'] = ( + os.path.join(GIT_BASEDIR, 'tests/ansible/hosts') + ) args = ['ansible-playbook'] args += ['-e', json.dumps(extra)]