diff --git a/defaults/main.yml b/defaults/main.yml index 45fe713..4f200b6 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -72,8 +72,6 @@ trove_venv_download_url: http://127.0.0.1/venvs/untagged/ubuntu/trove.tgz trove_git_repo: "https://git.openstack.org/openstack/trove" trove_git_install_branch: master -trove_requirements_git_repo: https://git.openstack.org/openstack/requirements -trove_requirements_git_install_branch: master trove_developer_mode: false trove_developer_constraints: - "git+{{ trove_git_repo }}@{{ trove_git_install_branch }}#egg=trove" diff --git a/releasenotes/notes/remove-requirements-git-88e681504fbd8db1.yaml b/releasenotes/notes/remove-requirements-git-88e681504fbd8db1.yaml new file mode 100644 index 0000000..61145e7 --- /dev/null +++ b/releasenotes/notes/remove-requirements-git-88e681504fbd8db1.yaml @@ -0,0 +1,7 @@ +--- +upgrade: + - The variables ``trove_requirements_git_repo`` and + ``trove_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/trove_install.yml b/tasks/trove_install.yml index b8b5c36..1a243fb 100644 --- a/tasks/trove_install.yml +++ b/tasks/trove_install.yml @@ -30,33 +30,13 @@ when: - trove_developer_mode | bool -- name: Clone requirements git repository - git: - repo: "{{ trove_requirements_git_repo }}" - dest: "/opt/requirements" - clone: yes - update: yes - version: "{{ trove_requirements_git_install_branch }}" - when: - - trove_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: - - trove_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 trove_developer_mode | bool - - name: Install required pip packages pip: name: "{{ trove_requires_pip_packages | join(' ') }}" state: "{{ trove_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 @@ -132,7 +112,10 @@ state: "{{ trove_pip_package_state }}" virtualenv: "{{ trove_bin | dirname }}" virtualenv_site_packages: "no" - extra_args: "{{ pip_install_options_fact }}" + extra_args: >- + {{ trove_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