Merge "Ensure that global-requirement-pins.txt is applied"
This commit is contained in:
commit
c05ad364fa
@ -128,3 +128,9 @@ is_metal: >-
|
|||||||
{{ (properties is defined) and
|
{{ (properties is defined) and
|
||||||
(properties.is_metal is defined) and
|
(properties.is_metal is defined) and
|
||||||
(properties.is_metal | bool) }}
|
(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 }}
|
||||||
|
@ -176,8 +176,9 @@ sed -i "s|OSA_PLAYBOOK_PATH|${OSA_PLAYBOOK_PATH}|g" /usr/local/bin/openstack-ans
|
|||||||
|
|
||||||
# Create openstack ansible wrapper tool
|
# Create openstack ansible wrapper tool
|
||||||
cp -v ${OSA_WRAPPER_BIN} /usr/local/bin/openstack-ansible
|
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
|
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
|
sed -i "s|CURRENT_OSA_VERSION|${CURRENT_OSA_VERSION}|g" /usr/local/bin/openstack-ansible
|
||||||
|
|
||||||
# Ensure wrapper tool is executable
|
# Ensure wrapper tool is executable
|
||||||
|
@ -18,7 +18,10 @@
|
|||||||
# OpenStack wrapper tool to ease the use of ansible with multiple variable files.
|
# 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}"
|
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_VERSION="CURRENT_OSA_VERSION"
|
||||||
|
export OSA_CLONE_ROOT="OSA_CLONE_DIR"
|
||||||
|
|
||||||
function info {
|
function info {
|
||||||
if [ "${ANSIBLE_NOCOLOR:-0}" -eq "1" ]; then
|
if [ "${ANSIBLE_NOCOLOR:-0}" -eq "1" ]; then
|
||||||
@ -32,7 +35,7 @@ function info {
|
|||||||
RUN_CMD=$(basename ${0})
|
RUN_CMD=$(basename ${0})
|
||||||
|
|
||||||
# Apply the OpenStack-Ansible configuration selectively.
|
# 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.
|
# Source the Ansible configuration.
|
||||||
. /usr/local/bin/openstack-ansible.rc
|
. /usr/local/bin/openstack-ansible.rc
|
||||||
|
Loading…
x
Reference in New Issue
Block a user