diff --git a/defaults/main.yml b/defaults/main.yml index a175d8d..f1dda85 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -71,13 +71,8 @@ barbican_developer_mode: false ## The git source/branch barbican_git_repo: "https://git.openstack.org/openstack/barbican" barbican_git_install_branch: master - barbican_git_dest: "/opt/barbican_{{ barbican_git_install_branch |replace('/', '_') }}" -## The git source/branch for the upper-constraints (used in developer mode) -barbican_requirements_git_repo: https://git.openstack.org/openstack/requirements -barbican_requirements_git_install_branch: master - ## The packages to build from source (used in developer mode) barbican_developer_constraints: - "git+{{ barbican_git_repo }}@{{ barbican_git_install_branch }}#egg=barbican" diff --git a/releasenotes/notes/remove-requirements-git-bf84874e42ca5fd1.yaml b/releasenotes/notes/remove-requirements-git-bf84874e42ca5fd1.yaml new file mode 100644 index 0000000..c2d1520 --- /dev/null +++ b/releasenotes/notes/remove-requirements-git-bf84874e42ca5fd1.yaml @@ -0,0 +1,7 @@ +--- +upgrade: + - The variables ``barbican_requirements_git_repo`` and + ``barbican_requirements_git_install_branch`` have been + removed in favour of using the URL/path to the + upper-constraints file using the + variable ``pip_install_upper_constraints`` instead. diff --git a/tasks/install.yml b/tasks/install.yml index 20c6a57..7fdca4b 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -25,36 +25,15 @@ {% for item in barbican_developer_constraints %} {{ item }} {% endfor %} - when: - - barbican_developer_mode | bool - -- name: Clone requirements git repository - git: - repo: "{{ barbican_requirements_git_repo }}" - dest: "/opt/requirements" - clone: yes - update: yes - version: "{{ barbican_requirements_git_install_branch }}" - when: - - barbican_developer_mode | bool - -- name: Add constraints to pip_install_options fact for developer mode - set_fact: - pip_install_options_fact: "{{ pip_install_options|default('') }} --constraint /opt/developer-pip-constraints.txt --constraint /opt/requirements/upper-constraints.txt" - when: - - barbican_developer_mode | bool - -- name: Set pip_install_options_fact when not in developer mode - set_fact: - pip_install_options_fact: "{{ pip_install_options|default('') }}" - when: - - not barbican_developer_mode | bool + when: barbican_developer_mode | bool - name: Install requires pip packages pip: name: "{{ barbican_requires_pip_packages | join(' ') }}" state: latest - extra_args: "{{ pip_install_options_fact }}" + extra_args: >- + {{ (pip_install_upper_constraints is defined) | ternary('--constraint ' + pip_install_upper_constraints | default(''),'') }} + {{ pip_install_options | default('') }} register: install_packages until: install_packages|success retries: 5 @@ -128,7 +107,10 @@ state: latest virtualenv: "{{ barbican_bin | dirname }}" virtualenv_site_packages: "no" - extra_args: "{{ pip_install_options_fact }}" + extra_args: >- + {{ barbican_developer_mode | ternary('--constraint /opt/developer-pip-constraints.txt', '') }} + {{ (pip_install_upper_constraints is defined) | ternary('--constraint ' + pip_install_upper_constraints | default(''),'') }} + {{ pip_install_options | default('') }} register: install_packages until: install_packages|success retries: 5