diff --git a/defaults/main.yml b/defaults/main.yml index e7d8579d..856a5753 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -20,8 +20,6 @@ cinder_pip_package_state: "latest" cinder_git_repo: https://git.openstack.org/openstack/cinder cinder_git_install_branch: master -cinder_requirements_git_repo: https://git.openstack.org/openstack/requirements -cinder_requirements_git_install_branch: master cinder_developer_mode: false cinder_developer_constraints: - "git+{{ cinder_git_repo }}@{{ cinder_git_install_branch }}#egg=cinder" diff --git a/releasenotes/notes/remove-requirements-git-6f43595994cc906e.yaml b/releasenotes/notes/remove-requirements-git-6f43595994cc906e.yaml new file mode 100644 index 00000000..0e87657f --- /dev/null +++ b/releasenotes/notes/remove-requirements-git-6f43595994cc906e.yaml @@ -0,0 +1,7 @@ +--- +upgrade: + - The variables ``cinder_requirements_git_repo`` and + ``cinder_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/cinder_install.yml b/tasks/cinder_install.yml index 1d04da1a..358bbb26 100644 --- a/tasks/cinder_install.yml +++ b/tasks/cinder_install.yml @@ -26,36 +26,15 @@ {% for item in cinder_developer_constraints %} {{ item }} {% endfor %} - when: - - cinder_developer_mode | bool - -- name: Clone requirements git repository - git: - repo: "{{ cinder_requirements_git_repo }}" - dest: "/opt/requirements" - clone: yes - update: yes - version: "{{ cinder_requirements_git_install_branch }}" - when: - - cinder_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: - - cinder_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 cinder_developer_mode | bool + when: cinder_developer_mode | bool - name: Install requires pip packages pip: name: "{{ cinder_requires_pip_packages | join(' ') }}" state: "{{ cinder_pip_package_state }}" - 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 @@ -130,7 +109,10 @@ state: "{{ cinder_pip_package_state }}" virtualenv: "{{ cinder_bin | dirname }}" virtualenv_site_packages: "no" - extra_args: "{{ pip_install_options_fact }}" + extra_args: >- + {{ cinder_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