diff --git a/defaults/main.yml b/defaults/main.yml index e9ebbcd..0229fa6 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -27,8 +27,6 @@ rally_etc_directory: /etc/rally rally_git_repo: https://git.openstack.org/openstack/rally rally_git_install_branch: master -rally_requirements_git_repo: https://git.openstack.org/openstack/requirements -rally_requirements_git_install_branch: master rally_developer_mode: false rally_developer_constraints: - "git+{{ rally_git_repo }}@{{ rally_git_install_branch }}#egg=rally" diff --git a/releasenotes/notes/remove-requirements-git-c93cd07554c5f1e4.yaml b/releasenotes/notes/remove-requirements-git-c93cd07554c5f1e4.yaml new file mode 100644 index 0000000..64eb203 --- /dev/null +++ b/releasenotes/notes/remove-requirements-git-c93cd07554c5f1e4.yaml @@ -0,0 +1,7 @@ +--- +upgrade: + - The variables ``rally_requirements_git_repo`` and + ``rally_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 5971c9e..173c5a3 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -24,36 +24,15 @@ {% for item in rally_developer_constraints %} {{ item }} {% endfor %} - when: - - rally_developer_mode | bool - -- name: Clone requirements git repository - git: - repo: "{{ rally_requirements_git_repo }}" - dest: "/opt/requirements" - clone: yes - update: yes - version: "{{ rally_requirements_git_install_branch }}" - when: - - rally_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: - - rally_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 rally_developer_mode | bool + when: rally_developer_mode | bool - name: Install requires pip packages pip: name: "{{ rally_requires_pip_packages | join(' ') }}" state: "{{ rally_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 @@ -124,7 +103,10 @@ state: "{{ rally_pip_package_state }}" virtualenv: "{{ rally_bin | dirname }}" virtualenv_site_packages: "no" - extra_args: "{{ pip_install_options_fact }}" + extra_args: >- + {{ rally_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