Merge "Apply global-pins as constraints to ensure complete pinning"
This commit is contained in:
commit
93412056dc
@ -25,8 +25,21 @@
|
||||
register: upper_constraints_check
|
||||
failed_when: false
|
||||
|
||||
- name: Remove global requirement pins file from host
|
||||
file:
|
||||
path: "/opt/global-requirement-pins.txt"
|
||||
state: absent
|
||||
when: (upper_constraints_check.status | default(503)) == 200
|
||||
|
||||
- name: Copy global requirement pins file to host
|
||||
copy:
|
||||
src: "../global-requirement-pins.txt"
|
||||
dest: "/opt/global-requirement-pins.txt"
|
||||
when: (upper_constraints_check.status | default(503)) != 200
|
||||
|
||||
- name: Set pip install upper constraints
|
||||
set_fact:
|
||||
pip_install_upper_constraints: >-
|
||||
http://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?id={{ requirements_git_install_branch | regex_replace(' #.*$','') }}
|
||||
/opt/global-requirement-pins.txt
|
||||
--constraint http://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?id={{ requirements_git_install_branch | regex_replace(' #.*$','') }}
|
||||
when: (upper_constraints_check.status | default(503)) != 200
|
||||
|
@ -110,7 +110,7 @@ PIP_COMMAND="/opt/ansible-runtime/bin/pip"
|
||||
${PIP_COMMAND} install ${PIP_OPTS} ${PIP_INSTALL_OPTIONS} || ${PIP_COMMAND} install ${PIP_OPTS} --isolated ${PIP_INSTALL_OPTIONS}
|
||||
|
||||
# Set the constraints now that we know we're using the right version of pip
|
||||
PIP_OPTS+=" --constraint ${UPPER_CONSTRAINTS_FILE}"
|
||||
PIP_OPTS+=" --constraint global-requirement-pins.txt --constraint ${UPPER_CONSTRAINTS_FILE}"
|
||||
|
||||
# Install the required packages for ansible
|
||||
$PIP_COMMAND install $PIP_OPTS -r requirements.txt ${ANSIBLE_PACKAGE} || $PIP_COMMAND install --isolated $PIP_OPTS -r requirements.txt ${ANSIBLE_PACKAGE}
|
||||
|
Loading…
x
Reference in New Issue
Block a user