diff --git a/defaults/main.yml b/defaults/main.yml index 9d7d4d35..5907b4d2 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -28,8 +28,6 @@ keystone_shibboleth_repo: {} # of an OpenStack-Ansible repo_server. keystone_git_repo: https://git.openstack.org/openstack/keystone keystone_git_install_branch: master -keystone_requirements_git_repo: https://git.openstack.org/openstack/requirements -keystone_requirements_git_install_branch: master keystone_developer_mode: false keystone_developer_constraints: - "git+{{ keystone_git_repo }}@{{ keystone_git_install_branch }}#egg=keystone" diff --git a/releasenotes/notes/remove-requirements-git-bdf5691b8390ed7c.yaml b/releasenotes/notes/remove-requirements-git-bdf5691b8390ed7c.yaml new file mode 100644 index 00000000..77c09c5d --- /dev/null +++ b/releasenotes/notes/remove-requirements-git-bdf5691b8390ed7c.yaml @@ -0,0 +1,7 @@ +--- +upgrade: + - The variables ``keystone_requirements_git_repo`` and + ``keystone_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/keystone_install.yml b/tasks/keystone_install.yml index 25cf6a29..d39b3e2f 100644 --- a/tasks/keystone_install.yml +++ b/tasks/keystone_install.yml @@ -40,36 +40,15 @@ {% for item in keystone_developer_constraints %} {{ item }} {% endfor %} - when: - - keystone_developer_mode | bool - -- name: Clone requirements git repository - git: - repo: "{{ keystone_requirements_git_repo }}" - dest: "/opt/requirements" - clone: yes - update: yes - version: "{{ keystone_requirements_git_install_branch }}" - when: - - keystone_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: - - keystone_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 keystone_developer_mode | bool + when: keystone_developer_mode | bool - name: Install required pip packages pip: name: "{{ keystone_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 @@ -145,7 +124,10 @@ state: latest virtualenv: "{{ keystone_bin | dirname }}" virtualenv_site_packages: "no" - extra_args: "{{ pip_install_options_fact }}" + extra_args: >- + {{ keystone_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 diff --git a/tests/os_keystone-overrides.yml b/tests/os_keystone-overrides.yml deleted file mode 100644 index f1fa1336..00000000 --- a/tests/os_keystone-overrides.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -install_test_packages: True