Skip to content
Snippets Groups Projects

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

Merged Karel van Klink requested to merge feature/fix-pipeline into develop
2 files
+ 6
7
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 4
6
@@ -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')
Loading