fa1d696990
This patch adds a pre_task that includes dependency vars when job 'dependency' is defined. This fix is needed to have 'repo-setup' role working properly on subnodes. Change-Id: Ie324ede9cd8cc857fbb85139ec059da427282843
92 lines
2.5 KiB
YAML
92 lines
2.5 KiB
YAML
---
|
|
- name: Add the overcloud nodes to the generated inventory
|
|
hosts: undercloud
|
|
gather_facts: true
|
|
tags:
|
|
- overcloud-deploy
|
|
vars:
|
|
inventory: multinode
|
|
roles:
|
|
- tripleo-inventory
|
|
|
|
- name: Create configs on subnodes
|
|
hosts: overcloud
|
|
pre_tasks:
|
|
- name: Include vars when dependency is defined
|
|
when: job.dependency is defined or dependency is defined
|
|
vars:
|
|
tripleo_quickstart_dir: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/tripleo-quickstart'].src_dir }}"
|
|
t_q_dependency_dir: "{{ tripleo_quickstart_dir }}/config/release/dependency_ci/{{ job.dependency|default(dependency) }}"
|
|
block:
|
|
- name: Load vars from dependency file
|
|
include_vars:
|
|
file: "{{ t_q_dependency_dir }}/repo_config.yaml"
|
|
roles:
|
|
# When doing mixed upgrade, we need different repos on undercloud
|
|
# vs. overcloud. Rely on $UPGRADE_RELEASE together with
|
|
# bootstrap-overcloud-full-minimal.sh to setup overcloud.
|
|
- role: repo-setup
|
|
when: not mixed_upgrade|default(false)|bool
|
|
tasks:
|
|
- name: Create a clean hosts file on subnodes
|
|
copy:
|
|
dest: /etc/hosts
|
|
content: |
|
|
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
|
|
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
|
|
become: true
|
|
|
|
- name: Run atop on overcloud node if configured
|
|
include_role:
|
|
name: undercloud-setup
|
|
tasks_from: atop
|
|
|
|
tags:
|
|
- undercloud-setup
|
|
|
|
- name: Prepare the undercloud for installation
|
|
hosts: undercloud
|
|
roles:
|
|
- undercloud-setup
|
|
tags:
|
|
- undercloud-setup
|
|
|
|
- name: Install built packages on subnodes
|
|
hosts: overcloud
|
|
vars:
|
|
ib_repo_host: undercloud
|
|
roles:
|
|
- role: repo-setup
|
|
when: not mixed_upgrade|default(false)|bool
|
|
- role: install-built-repo
|
|
when: hostvars['undercloud']['compressed_gating_repo'] is defined and not mixed_upgrade|default(false)|bool
|
|
|
|
tags:
|
|
- build
|
|
|
|
- name: Install the undercloud
|
|
hosts: undercloud
|
|
roles:
|
|
- undercloud-deploy
|
|
|
|
- name: Validate the undercloud
|
|
hosts: undercloud
|
|
roles:
|
|
- validate-undercloud
|
|
|
|
- name: Download amphora image for octavia
|
|
hosts: undercloud
|
|
gather_facts: false
|
|
tags:
|
|
- octavia
|
|
roles:
|
|
- {role: octavia-amphora-download,
|
|
when: download_amphora is defined and download_amphora|bool}
|
|
|
|
- name: Set Libvirt type
|
|
hosts: overcloud
|
|
roles:
|
|
- set-libvirt-type
|
|
tags:
|
|
- overcloud-deploy
|