tests: import ara_env helper script.

This commit is contained in:
David Wilson 2018-10-26 10:16:34 +01:00
parent 0d04e940b7
commit a7d635dff8
1 changed files with 28 additions and 0 deletions

28
tests/ansible/ara_env.py Executable file
View File

@ -0,0 +1,28 @@
#!/usr/bin/env python
"""
Print shell environment exports adding ARA plugins to the list of plugins
from ansible.cfg in the CWD.
"""
import os
import ara.setup
import ansible.constants as C
os.chdir(os.path.dirname(__file__))
print('export ANSIBLE_ACTION_PLUGINS=%s:%s' % (
':'.join(C.DEFAULT_ACTION_PLUGIN_PATH),
ara.setup.action_plugins,
))
print('export ANSIBLE_CALLBACK_PLUGINS=%s:%s' % (
':'.join(C.DEFAULT_CALLBACK_PLUGIN_PATH),
ara.setup.callback_plugins,
))
print('export ANSIBLE_LIBRARY=%s:%s' % (
':'.join(C.DEFAULT_MODULE_PATH),
ara.setup.library,
))