![Kevin Carter](/assets/img/avatar_default.png)
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>
21 lines
1.0 KiB
Django/Jinja
21 lines
1.0 KiB
Django/Jinja
# Computed constraints
|
|
{% set constraint_pkgs = [] -%}
|
|
{% for clone_item in local_packages.results.0.item.remote_package_parts -%}
|
|
{% if 'ignorerequirements=true' not in clone_item['original'] %}
|
|
git+file://{{ repo_build_git_dir }}/{{ clone_item['name'] }}@{{ clone_item['version'] }}#egg={{ clone_item['name'] | replace('-', '_') | lower }}
|
|
{% set _ = constraint_pkgs.append(clone_item['name'] | replace('-', '_') | lower) %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
# upper boundry constraints from requirements repo.
|
|
{% for constraint_item in upper_constraints %}
|
|
{%- set constraint_split = constraint_item.split('===') %}
|
|
{%- set constraint_name = constraint_split[0] %}
|
|
{%- set constraint_name_normalized = constraint_name | replace('-', '_') | lower %}
|
|
{% if constraint_name_normalized not in constraint_pkgs %}
|
|
{% if repo_build_use_upper_constraints | bool and (constraint_split | length) > 1 %}
|
|
{{ constraint_split[0] | replace('-', '_') | lower }}<={{ constraint_split[1] }}
|
|
{% elif (constraint_split | length) == 1 %}
|
|
{{ constraint_item }}
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endfor %} |