diff --git a/defaults/main.yml b/defaults/main.yml index 568357e9..dd6ae553 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -28,10 +28,6 @@ ceilometer_developer_mode: false ceilometer_git_repo: https://git.openstack.org/openstack/ceilometer ceilometer_git_install_branch: master -## The git source/branch for the upper-constraints (used in developer mode) -ceilometer_requirements_git_repo: https://git.openstack.org/openstack/requirements -ceilometer_requirements_git_install_branch: master - ## The packages to build from source (used in developer mode) ceilometer_developer_constraints: - "git+{{ ceilometer_git_repo }}@{{ ceilometer_git_install_branch }}#egg=ceilometer" diff --git a/releasenotes/notes/remove-requirements-git-eb90b906a4ad4642.yaml b/releasenotes/notes/remove-requirements-git-eb90b906a4ad4642.yaml new file mode 100644 index 00000000..0ba5a561 --- /dev/null +++ b/releasenotes/notes/remove-requirements-git-eb90b906a4ad4642.yaml @@ -0,0 +1,7 @@ +--- +upgrade: + - The variables ``ceilometer_requirements_git_repo`` and + ``ceilometer_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/ceilometer_install.yml b/tasks/ceilometer_install.yml index d98164dd..250933df 100644 --- a/tasks/ceilometer_install.yml +++ b/tasks/ceilometer_install.yml @@ -27,33 +27,14 @@ when: - ceilometer_developer_mode | bool -- name: Clone requirements git repository - git: - repo: "{{ ceilometer_requirements_git_repo }}" - dest: "/opt/requirements" - clone: yes - update: yes - version: "{{ ceilometer_requirements_git_install_branch }}" - when: - - ceilometer_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: - - ceilometer_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 ceilometer_developer_mode | bool - - name: Install requires pip packages pip: name: "{{ ceilometer_requires_pip_packages | join(' ') }}" state: "{{ ceilometer_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 @@ -129,7 +110,10 @@ state: "{{ ceilometer_pip_package_state }}" virtualenv: "{{ ceilometer_bin | dirname }}" virtualenv_site_packages: "no" - extra_args: "{{ pip_install_options_fact }}" + extra_args: >- + {{ ceilometer_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