diff --git a/defaults/main.yml b/defaults/main.yml index 41bba9b2..b73afe4d 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -35,6 +35,9 @@ neutron_lbaas_git_install_branch: master neutron_vpnaas_git_repo: https://git.openstack.org/openstack/neutron-vpnaas neutron_vpnaas_git_install_branch: master +neutron_requirements_git_repo: https://git.openstack.org/openstack/requirements +neutron_requirements_git_install_branch: "{{ requirements_git_install_branch | default(master) }}" + neutron_developer_mode: false neutron_developer_constraints: - "git+{{ neutron_git_repo }}@{{ neutron_git_install_branch }}#egg=neutron" diff --git a/tasks/neutron_install.yml b/tasks/neutron_install.yml index beac8d81..1b6e485b 100644 --- a/tasks/neutron_install.yml +++ b/tasks/neutron_install.yml @@ -85,15 +85,30 @@ - neutron-install - neutron-pip-packages -- name: Set constraint file fact for developer mode - set_fact: - pip_install_options: "{{ pip_install_options|default('') }} --constraint /opt/developer-pip-constraints.txt" +- name: Clone requirements git repository + git: + repo: "{{ neutron_requirements_git_repo }}" + dest: "/opt/requirements" + clone: yes + update: yes + version: "{{ neutron_requirements_git_install_branch }}" when: - neutron_developer_mode | bool tags: - neutron-install - neutron-pip-packages +- name: Add constraints to pip_install_options fact for developer mode + set_fact: + pip_install_options: "{{ pip_install_options|default('') }} --constraint /opt/developer-pip-constraints.txt --constraint /opt/requirements/upper-constraints.txt" + when: + - neutron_developer_mode | bool + - "'/opt/developer-pip-constraints.txt' not in pip_install_options|default('')" + - "'/opt/requirements/upper-constraints.txt' not in pip_install_options|default('')" + tags: + - neutron-install + - neutron-pip-packages + - name: Install requires pip packages pip: name: "{{ item }}"