Merge "Ensure that global-requirement-pins.txt is applied"

This commit is contained in:
Zuul 2019-04-22 21:48:11 +00:00 committed by Gerrit Code Review
commit c05ad364fa
3 changed files with 12 additions and 2 deletions

View File

@ -128,3 +128,9 @@ is_metal: >-
{{ (properties is defined) and
(properties.is_metal is defined) and
(properties.is_metal | bool) }}
_global_pins_file_path: >-
{{ (lookup('env', 'OSA_CLONE_ROOT') | default('/opt/openstack-ansible', true)) ~ '/global-requirement-pins.txt' }}
venv_build_global_constraints: >-
{{ lookup('file', _global_pins_file_path).splitlines() | reject('match','^#.*$') | reject('equalto', '') | list }}

View File

@ -176,8 +176,9 @@ sed -i "s|OSA_PLAYBOOK_PATH|${OSA_PLAYBOOK_PATH}|g" /usr/local/bin/openstack-ans
# Create openstack ansible wrapper tool
cp -v ${OSA_WRAPPER_BIN} /usr/local/bin/openstack-ansible
# Mark the current OSA git repo clone directory, so we don't need to compute it every time.
sed -i "s|OSA_CLONE_DIR|${OSA_CLONE_DIR}|g" /usr/local/bin/openstack-ansible
# Mark the current OSA version in the wrapper, so we don't need to compute it everytime.
# Mark the current OSA version in the wrapper, so we don't need to compute it every time.
sed -i "s|CURRENT_OSA_VERSION|${CURRENT_OSA_VERSION}|g" /usr/local/bin/openstack-ansible
# Ensure wrapper tool is executable

View File

@ -18,7 +18,10 @@
# OpenStack wrapper tool to ease the use of ansible with multiple variable files.
export PATH="/opt/ansible-runtime/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${PATH}"
# These environment variables are used in group_vars
export OSA_VERSION="CURRENT_OSA_VERSION"
export OSA_CLONE_ROOT="OSA_CLONE_DIR"
function info {
if [ "${ANSIBLE_NOCOLOR:-0}" -eq "1" ]; then
@ -32,7 +35,7 @@ function info {
RUN_CMD=$(basename ${0})
# Apply the OpenStack-Ansible configuration selectively.
if [[ "${PWD}" == *"OSA_CLONE_DIR"* ]] || [ "${RUN_CMD}" == "openstack-ansible" ]; then
if [[ "${PWD}" == *"${OSA_CLONE_ROOT}"* ]] || [ "${RUN_CMD}" == "openstack-ansible" ]; then
# Source the Ansible configuration.
. /usr/local/bin/openstack-ansible.rc