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

85 lines
2.5 KiB
YAML

---
# TODO(aschultz): fix tags in here to be undercloud-minion-setup
- name: Collect output from undercloud
hosts: undercloud
gather_facts: false
tasks:
- name: Copy output files
include_role:
name: undercloud-deploy
tasks_from: gather-outputs
tags:
- undercloud-setup
- name: Write output from undercloud
hosts: overcloud
gather_facts: false
tasks:
- name: Reading and setting undercloud facts from gather-outputs
set_fact:
undercloud_outputs: "{{ hostvars['undercloud']['undercloud_outputs'] }}"
undercloud_passwords: "{{ hostvars['undercloud']['undercloud_passwords'] }}"
- name: write output files to old consistent location
include_role:
name: undercloud-setup
tasks_from: write-outputs
- name: create new consistent location
file:
state: directory
path: "{{ working_dir ~ '/tripleo-deploy/minion' }}"
- name: write output files to new consistent location
include_role:
name: undercloud-setup
tasks_from: write-outputs
vars:
undercloud_outputs_dir: "{{ working_dir ~ '/tripleo-deploy/minion/' }}"
tags:
- undercloud-setup
- name: Setup the undercloud minion
hosts: overcloud
vars:
# these are the defaults but we should be explicit
minion_enable_heat_engine: true
minion_enable_ironic_conductor: true
tasks:
- name: Include atop setup
include_role:
name: undercloud-setup
tasks_from: atop
- name: Set container update fact from undercloud
set_fact:
update_containers_append_tag: "{{ hostvars['undercloud']['update_containers_append_tag'] | default('') }}"
- name: Include repo-setup
include_role:
name: repo-setup
- name: Include package installs
include_role:
name: undercloud-setup
tasks_from: package_installs
when: package_installs|default(true)|bool
- name: Update built packages
shell: |
{{ ansible_pkg_mgr }} --enablerepo='gating-repo' update -y # noqa 305
become: true
when: hostvars['undercloud']['compressed_gating_repo'] is defined
tags:
- undercloud-setup
- name: Deploy the undercloud minion
hosts: overcloud
roles:
- undercloud-minion-deploy
tags:
- undercloud-setup
- name: Validate minion
hosts: undercloud
vars:
validate_minion_heat_engine: true
validate_minion_ironic_conductor: true
roles:
- validate-minion
tags:
- overcloud-validate