Enable OpenStack-Infra Ubuntu Cloud Archive mirror

With the implementation of https://review.openstack.org/330152
OpenStack-Infra now has its own mirror of Ubuntu Cloud Archive.

This patch determines whether the bootstrap is running on
OpenStack-CI, and if it is it can figure out the appropriate
URL to use to access UCA and it configures the right override
to make sure that happens.

Change-Id: Ie8acab60c885454da65eda085a9c012e0af11807
This commit is contained in:
Jesse Pretorius 2016-06-30 21:05:12 +01:00
parent 36646a308d
commit 2a03ba0039
2 changed files with 7 additions and 5 deletions

View File

@ -125,8 +125,10 @@
- name: Disable nova using UCA in OpenStack-CI
set_fact:
nova_uca_enable: False
when: nodepool_dir.stat.exists
uca_apt_repo_url: "{{ bootstrap_host_ubuntu_repo | netorigin }}/ubuntu-cloud-archive"
when:
- nodepool_dir.stat.exists
- bootstrap_host_ubuntu_repo is defined
- name: Determine if the host has a global pip config file
stat:

View File

@ -100,7 +100,7 @@ repo_build_pip_extra_indexes:
{{ repo_build_pip_extra_indexes | to_nice_yaml }}
{% endif %}
{% if nova_uca_enable is defined %}
## TODO(odyssey4me) Remove this once OpenStack-Infra has UCA mirrors
nova_uca_enable: {{ nova_uca_enable }}
{% if uca_apt_repo_url is defined %}
## Ubuntu Cloud Archive mirror to use
uca_apt_repo_url: {{ uca_apt_repo_url }}
{% endif %}