From 4f30e8a941a4c8cfc1ed2def2dcc2e7e61b3a0be Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Tue, 9 Feb 2016 15:52:33 +0000 Subject: [PATCH] Check local and upstream repo for pip before using pypi This patch adds an extra source to try and use before failing and reverting to installing using the isolated mode (thereby installing from pypi). This should result in the install task succeeding on the first attempt before the local repo exists, instead of always failing and falling back to pypi. Change-Id: I41821afb35c29984bd6372b6628aa3ca8a2a5715 --- playbooks/inventory/group_vars/hosts.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/playbooks/inventory/group_vars/hosts.yml b/playbooks/inventory/group_vars/hosts.yml index 98422039b9..5fb8ca11f8 100644 --- a/playbooks/inventory/group_vars/hosts.yml +++ b/playbooks/inventory/group_vars/hosts.yml @@ -59,11 +59,14 @@ galera_wsrep_address: "{{ ansible_ssh_host }}" ## Pip install -# Lock down pip to only a specific version of pip +# Ensure that the pip_install role tries the local repo before looking +# for pip in alternative locations pip_get_pip_options: > --no-index - --find-links="{{ openstack_repo_url }}/os-releases/{{ openstack_release }}" - --trusted-host {{ openstack_repo_url | netloc_no_port }} + --find-links "{{ openstack_repo_url }}/os-releases/{{ openstack_release }}" + --find-links "{{ repo_pip_default_index | netorigin }}/os-releases/{{ openstack_release }}" + --trusted-host "{{ openstack_repo_url | netloc_no_port }}" + --trusted-host "{{ repo_pip_default_index | netorigin }}" pip_links: - { name: "openstack_release", link: "{{ openstack_repo_url }}/os-releases/{{ openstack_release }}/" }