openstack-ansible/playbooks/common-tasks/set-upper-constraints.yml
Jesse Pretorius 46258cc435 Ensure that upper constraints are always applied
When the upper constraints are not applied, the resulting
build for the same tag may be different from one day to
the next. This results in an inconsistent experience for
deployers.

This patch sets the upper constraints to be used by the
following:
- https://review.openstack.org/388159 (lxc hosts)
- https://review.openstack.org/388072 (pip install)
- https://review.openstack.org/388230 (keystone install)
  This is a pattern to establish across other roles.

As some pip installs happen before the repo server is up
a common set of tasks is added to a few of the plays to
verify if there is a local copy of constraints available.
If not it will then source the upstream constraints based
on the OpenStack requirements SHA that's been pinned.

Change-Id: I7ddd44be30c610609c1429147646dcb1d3e6ca59
2016-10-21 19:31:07 +00:00

33 lines
1.3 KiB
YAML

---
# Copyright 2016, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This set of tasks checks whether the repo is up yet. If it is it
# will use the compiled upper constraints available there. If it
# is not yet up, then it will use the upstream upper constraints
# for the SHA currently pinned.
- name: Test internal repo URL for the current upper constraints file
uri:
url: "{{ pip_install_upper_constraints }}"
method: "HEAD"
register: upper_constraints_check
failed_when: false
- 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(' #.*$','') }}
when: upper_constraints_check.status != 200