tripleo-quickstart-extras/playbooks/multinode-undercloud-mixed-...

96 lines
2.7 KiB
YAML

---
- name: Add the overcloud nodes to the generated inventory
hosts: undercloud
gather_facts: true
tags:
- overcloud-deploy
vars:
inventory: multinode_mixed_os
roles:
- tripleo-inventory
- name: Create configs on subnodes
hosts: overcloud_control
roles:
- 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_control
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
tags: undercloud-install
hosts: undercloud
tasks:
- name: get hash set fact mixed_os_dlrn_hash_8 for periodic jobs (no content provider)
when:
- not job.consumer_job | default(false) | bool
- registry_distro_lower is defined
block:
- include_role:
name: repo-setup
tasks_from: tripleo-get-hash-set-fact.yml
vars:
search_tag: "{{ dlrn_hash_tag }}"
tgh_os_version_override: "{{ (ansible_distribution == 'RedHat') | ternary('rhel', 'centos') }}8"
fact_name: "mixed_os_dlrn_hash_8"
- name: "debug dlrn_hash_tag resolution "
debug:
msg: "d_h_t {{ dlrn_hash_tag }} resolved to mixed_os_dlrn_hash_8 {{ mixed_os_dlrn_hash_8 }} "
- name: set fact mixed_os_dlrn_hash_8 for check/gate jobs (with content provider)
when:
- job.consumer_job | default(false) | bool
- job.provider_dlrn_hash_distro is defined
- registry_distro_lower is defined
set_fact:
mixed_os_dlrn_hash_8: "{{ job.provider_dlrn_hash_distro[registry_distro_lower] }}"
- name: Deploy the undercloud
include_role:
name: undercloud-deploy
- name: Validate the undercloud
hosts: undercloud
roles:
- validate-undercloud
- name: Set Libvirt type
hosts: overcloud
roles:
- set-libvirt-type
tags:
- overcloud-deploy