Ensure that OpenStack-CI mirror is used for UCA
The role test implements a test to verify whether it is running in OpenStack-CI, then discovers the appropriate URL for UCA and implements it as a fact for the os_nova role to consume. Change-Id: I60c5575a5ad02d0fa958912bdbc596f2f44e48b0
This commit is contained in:
parent
3cbabaf792
commit
fbb65f0d49
|
@ -107,6 +107,21 @@
|
|||
when: inventory_hostname == groups['nova_all'][0]
|
||||
tags:
|
||||
- nova-db-setup
|
||||
- name: Check if this is an OpenStack-CI nodepool instance
|
||||
stat:
|
||||
path: /etc/nodepool/provider
|
||||
register: nodepool
|
||||
delegate_to: localhost
|
||||
- name: Determine the existing Ubuntu repo URL (only on OpenStack-CI)
|
||||
shell: 'awk "/^deb .*ubuntu\/? {{ ansible_distribution_release }} main/ {print \$2; exit}" /etc/apt/sources.list'
|
||||
register: ubuntu_repo_url
|
||||
changed_when: false
|
||||
when: nodepool.stat.exists | bool
|
||||
delegate_to: localhost
|
||||
- name: Set Ubuntu Cloud Archive repo URL based on discovered information
|
||||
set_fact:
|
||||
uca_apt_repo_url: "{{ ubuntu_repo_url.stdout | netorigin }}/ubuntu-cloud-archive"
|
||||
when: nodepool.stat.exists | bool
|
||||
roles:
|
||||
- role: os_nova
|
||||
vars_files:
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- name: Perform baisc LXC host setup
|
||||
- name: Perform basic LXC host setup
|
||||
hosts: localhost
|
||||
pre_tasks:
|
||||
- name: Ensure root's new public ssh key is in authorized_keys
|
||||
|
|
Loading…
Reference in New Issue