Skip to content
Snippets Groups Projects
Commit 592a0d95 authored by Karel van Klink's avatar Karel van Klink :smiley_cat:
Browse files

Merge branch 'feature/fix-pipeline' into 'develop'

change ANSIBLE_HOME instead of collections path only, set remote tmp for test

See merge request !15
parents 3572080e 5c3107a6
No related branches found
No related tags found
1 merge request!15change ANSIBLE_HOME instead of collections path only, set remote tmp for test
...@@ -54,15 +54,13 @@ def ansible_playbook_bin(): ...@@ -54,15 +54,13 @@ def ansible_playbook_bin():
subprocess.check_call([pip_path, 'install', 'ansible', subprocess.check_call([pip_path, 'install', 'ansible',
'ansible_runner']) 'ansible_runner'])
# Set environment variable for a custom Ansible home
os.environ['ANSIBLE_HOME'] = venv_dir
# Add Ansible Galaxy collection # Add Ansible Galaxy collection
galaxy_path = os.path.join(venv_dir, 'bin', 'ansible-galaxy') galaxy_path = os.path.join(venv_dir, 'bin', 'ansible-galaxy')
subprocess.check_call([galaxy_path, 'collection', 'install', subprocess.check_call([galaxy_path, 'collection', 'install',
TEST_CONFIG['collection-name'], '-p', TEST_CONFIG['collection-name']])
os.path.join(venv_dir, 'collections')])
# Set the environment variable for the custom collections path
os.environ['ANSIBLE_COLLECTIONS_PATH'] = \
os.path.join(venv_dir, 'collections')
yield os.path.join(venv_dir, 'bin', 'ansible-playbook') yield os.path.join(venv_dir, 'bin', 'ansible-playbook')
......
...@@ -22,7 +22,8 @@ def test_run_playbook(ansible_playbook_bin, playbook_filename): ...@@ -22,7 +22,8 @@ def test_run_playbook(ansible_playbook_bin, playbook_filename):
ansible_playbook_bin, ansible_playbook_bin,
'-i', 'localhost,', '-i', 'localhost,',
playbook_filename, playbook_filename,
'--connection=local' '--connection=local',
'-e', 'ansible_remote_tmp=/tmp'
], ],
capture_output=True, capture_output=True,
check=False check=False
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment