issue #409: add test stubs to the PATH in run_ansible_playbook.py

issue260
David Wilson 6 years ago
parent 51658fdd66
commit c51b67b863

@ -6,19 +6,29 @@ import os
import sys import sys
GIT_BASEDIR = os.path.dirname(
os.path.abspath(
os.path.join(__file__, '..', '..')
)
)
# Used by delegate_to.yml to ensure "sudo -E" preserves environment. # Used by delegate_to.yml to ensure "sudo -E" preserves environment.
os.environ['I_WAS_PRESERVED'] = '1' os.environ['I_WAS_PRESERVED'] = '1'
# Used by LRU tests. # Used by LRU tests.
os.environ['MITOGEN_MAX_INTERPRETERS'] = '3' os.environ['MITOGEN_MAX_INTERPRETERS'] = '3'
# Add test stubs to path.
os.environ['PATH'] = '%s%s%s' % (
os.path.join(GIT_BASEDIR, 'tests', 'data', 'stubs'),
os.pathsep,
os.environ['PATH'],
)
extra = { extra = {
'is_mitogen': os.environ.get('ANSIBLE_STRATEGY', '').startswith('mitogen'), 'is_mitogen': os.environ.get('ANSIBLE_STRATEGY', '').startswith('mitogen'),
'git_basedir': os.path.dirname( 'git_basedir': GIT_BASEDIR,
os.path.abspath(
os.path.join(__file__, '..', '..')
)
)
} }
args = ['ansible-playbook'] args = ['ansible-playbook']

Loading…
Cancel
Save