Files
openstack-ansible/playbooks/roles/repo_build/tasks/repo_set_facts.yml
Kevin Carter 2f35e36e54 Updated the py_pkgs lookup plugin for multi source
The py_pkgs lookup plugin will now handle multiple sources. This change
was needed to enable the system to allow for overrides of repo_package
resources and general python packaging as found throughout the stack.
The module has precedence as it loads / searches for packages and he item
loaded last is the one that has the most precedence.

The repo-build play has been updated to now search for compatible packages
in the main playbook directory, the root ansible role directory and the
user_variables file.

Documentation has been added regarding this capability and how to override
and set items to meet the needs of the deployment.

Closes-Bug: #1510575
Implements: blueprint independent-role-repositories
Change-Id: Ib7cda14db18c0ca58bb5ac495d1c201812cf0f48
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2015-12-02 18:11:56 -06:00

72 lines
2.3 KiB
YAML

---
# Copyright 2015, 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.
- name: Retrieve global requirements content
slurp:
src: "{{ repo_build_git_dir }}/requirements/global-requirements.txt"
register: slurp_global_requirements
tags:
- repo-set-requirement-names-filtered
- repo-set-requirement-names
- repo-set-requirements
- repo-get-global-requirements
- name: Set requirements
set_fact:
global_requirement: "{{ slurp_global_requirements.content | b64decode | splitlines }}"
tags:
- repo-set-requirement-names-filtered
- repo-set-requirement-names
- repo-set-requirements
- name: Set requirement names
set_fact:
global_requirement_names: "{{ global_requirement | pip_requirement_names }}"
tags:
- repo-set-requirement-names-filtered
- repo-set-requirement-names
- repo-set-requirements
- name: Set filtered requirement names
set_fact:
global_requirement_names_filtered: "{{ local_packages.results.0.item.packages | filtered_list(global_requirement_names) }}"
tags:
- repo-set-requirement-names-filtered
- repo-set-requirements
- name: Retrieve upper constraints content
slurp:
src: "{{ repo_build_git_dir }}/requirements/upper-constraints.txt"
register: slurp_upper_constraints
tags:
- repo-set-constraints
- repo-get-upper-constraints
- repo-build-constraints-file
- name: Set upper constraints
set_fact:
_upper_constraints: "{{ slurp_upper_constraints.content | b64decode | splitlines }}"
when: slurp_upper_constraints | success
tags:
- repo-set-constraints
- repo-build-constraints-file
- name: Set upper constraints
set_fact:
upper_constraints: "{{ _upper_constraints | pip_constraint_update(local_packages.results.0.item.packages) }}"
when: slurp_upper_constraints | success
tags:
- repo-set-constraints
- repo-build-constraints-file