From a7d635dff8f6ce90b420082052179fc4a8a5ac4a Mon Sep 17 00:00:00 2001 From: David Wilson Date: Fri, 26 Oct 2018 10:16:34 +0100 Subject: [PATCH] tests: import ara_env helper script. --- tests/ansible/ara_env.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 tests/ansible/ara_env.py diff --git a/tests/ansible/ara_env.py b/tests/ansible/ara_env.py new file mode 100755 index 00000000..ab2b726e --- /dev/null +++ b/tests/ansible/ara_env.py @@ -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, +))