validations-common/ansible-test-env.rc
Gael Chamoulaud (Strider) ab26d8263a
[Testing Infra] Apply here the improvements done to tripleo-validations
This patch brings out the improvements done from tripleo-validations to
validations-common regarding the molecule testing infrastructure with
the UBI8 images.

This patch integrates molecule fix after release of cryptography3.4.
See https://review.opendev.org/c/openstack/tripleo-validations/+/774747

Related-Bug: #1915101
Co-Authored-By: David Vallee Delisle <dvd@redhat.com>
Change-Id: I2e5ebebdd48e4013aa87868a22807e91feb3ffab
Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
2021-04-01 10:16:07 +02:00

25 lines
984 B
Plaintext

export VALIDATIONS_COMMON_WORKPATH="$(dirname $(readlink -f ${BASH_SOURCE[0]}))"
export ANSIBLE_STDOUT_CALLBACK=debug
export ANSIBLE_LIBRARY="${VALIDATIONS_COMMON_WORKPATH}/validations_common/library"
# TODO(gchamoul): uncomment once we host lookup plugins
#export ANSIBLE_LOOKUP_PLUGINS="${VALIDATIONS_COMMON_WORKPATH}/validations_common/lookup_plugins"
export ANSIBLE_ROLES_PATH="${VALIDATIONS_COMMON_WORKPATH}/validations_common/roles"
export ANSIBLE_INVENTORY="${VALIDATIONS_COMMON_WORKPATH}/tests/hosts.ini"
export ANSIBLE_RETRY_FILES_ENABLED="0"
export ANSIBLE_LOAD_CALLBACK_PLUGINS="1"
export ANSIBLE_HOST_KEY_CHECKING=False
function unset-ansible-test-env {
for i in $(env | grep ANSIBLE_ | awk -F'=' '{print $1}'); do
unset ${i}
done
unset VALIDATIONS_COMMON_WORKPATH
echo -e "Ansible test environment deactivated.\n"
unset -f unset-ansible-test-env
}
echo -e "Ansible test environment is now active"
echo -e "Run 'unset-ansible-test-env' to deactivate.\n"