tripleo-quickstart-extras/playbooks/baremetal-undercloud-validate-ha.yml
Raoul Scarazzini e9588bb424 Add external repo and img roles to bm undercloud
This commit replaces the actual repo configuration and overcloud
images preparation inclusions with the already existing external
dedicated roles (repo-setup and fetch-images).
To configure this the two playbooks are modified and a new "packages"
subrole is created under the main baremetal-undercloud one.
With this in place it is possible to follow this sequence:

- Provide and prepare the undercloud machine (role baremetal-undercloud)
- Inventory the newly created machine (role tripleo-inventory)
- Setup repositories (role repo-setup)
- Install and configure packages on undercloud (baremetal-undercloud's
  subrole named "packages"):
  - tripleo package
  - additional packages (optional)
  - ntp configuration (replaces what was done before in the custom
    template undercloud-repos-conf.sh.j2)
- Install the undercloud

A new review to update the documentation will be done after this gets
merged.

Change-Id: Iba11c4d61a63bb05016177abd16403168d82331b
2017-01-12 08:08:20 -05:00

127 lines
2.6 KiB
YAML

---
- name: Baremetal undercloud install
hosts: localhost
roles:
- baremetal-undercloud
tags:
- baremetal-undercloud
- name: Add the undercloud node to the generated inventory
hosts: localhost
gather_facts: yes
roles:
- tripleo-inventory
tags:
- undercloud-inventory
- name: Setup repositories
hosts: undercloud
gather_facts: yes
roles:
- repo-setup
tags:
- undercloud-repo-setup
- name: Install packages
hosts: undercloud
gather_facts: no
roles:
- baremetal-undercloud/packages
tags:
- undercloud-pkgs-install
- name: Deploy the undercloud
hosts: undercloud
gather_facts: no
roles:
- undercloud-deploy
tags:
- undercloud-deploy
- name: Prepare baremetal for the overcloud deployment
hosts: undercloud
roles:
- baremetal-prep-overcloud
tags:
- baremetal-prep-overcloud
- name: Prepare configuration files for the overcloud deployment
hosts: undercloud
gather_facts: no
roles:
- overcloud-prep-config
tags:
- overcloud-prep-config
- name: Fetch the overcloud images
hosts: undercloud
gather_facts: no
become: true
roles:
- fetch-images
tags:
- overcloud-fetch-images
- name: Prepare the overcloud images for deployment
hosts: undercloud
gather_facts: no
roles:
- overcloud-prep-images
tags:
- overcloud-prep-images
- name: Prepare overcloud flavors
hosts: undercloud
gather_facts: no
roles:
- overcloud-prep-flavors
tags:
- overcloud-prep-flavors
- name: Prepare the undercloud networks for the overcloud deployment
hosts: undercloud
gather_facts: no
roles:
- overcloud-prep-network
tags:
- overcloud-prep-network
- name: Deploy the overcloud
hosts: undercloud
gather_facts: yes
roles:
- overcloud-deploy
tags:
- overcloud-deploy
- name: Add the overcloud nodes to the generated inventory
hosts: undercloud
gather_facts: yes
vars:
inventory: all
roles:
- tripleo-inventory
tags:
- overcloud-inventory
- name: Check the result of the deployment
hosts: localhost
tasks:
- name: ensure the deployment result has been read into memory
include_vars: "{{ local_working_dir }}/overcloud_deployment_result.json"
# overcloud_deploy_result = ["failed", "passed"]
- name: did the deployment pass or fail?
debug: var=overcloud_deploy_result
failed_when: overcloud_deploy_result == "failed"
tags:
- overcloud-deploy-check
- name: Validate the overcloud using HA tests
hosts: undercloud
gather_facts: no
roles:
- validate-ha
tags:
- overcloud-validate-ha