661358a588
Also fix ansible-lint errors and disable flake8 checks on the files within the roles until we fix them. Change-Id: Iab40c0fea517b2f74b91cab7b0f443de89e453b8
138 lines
3.3 KiB
YAML
138 lines
3.3 KiB
YAML
---
|
|
# Add the virthost to the in-memory inventory. The inventory is not
|
|
# wirtten out to disk unless you call the `rebuild-inventory` role.
|
|
- name: Add the virthost to the inventory
|
|
hosts: localhost
|
|
tasks:
|
|
- name: Add virthost
|
|
add_host:
|
|
name: "{{virthost}}"
|
|
groups: "virthost"
|
|
ansible_fqdn: "{{ virthost }}"
|
|
ansible_user: "root"
|
|
ansible_host: "{{ virthost }}"
|
|
|
|
- include: teardown-provision.yml
|
|
|
|
# The `provision.yml` playbook is responsible for
|
|
# creating an inventory entry for our `virthost` and for creating an
|
|
# unprivileged user on that host for use by our virtual environment.
|
|
- include: provision.yml
|
|
|
|
# These teardown tasks only make sense after running provision.yml,
|
|
# because they assume they are connecting as the `stack` user rather
|
|
# than `root`.
|
|
- include: teardown-nodes.yml
|
|
- include: teardown-environment.yml
|
|
|
|
# The `environment/setup` role performs any tasks that require `root`
|
|
# access on the target host.
|
|
- name: Install libvirt packages and configure networks
|
|
hosts: virthost
|
|
tags:
|
|
- environment
|
|
roles:
|
|
- environment/setup
|
|
|
|
- name: Setup undercloud and baremetal vms and networks in libvirt
|
|
hosts: virthost
|
|
gather_facts: yes
|
|
roles:
|
|
- libvirt/setup
|
|
|
|
# Add the undercloud node to the generated
|
|
# inventory.
|
|
- name: Inventory the undercloud
|
|
hosts: localhost
|
|
gather_facts: yes
|
|
vars:
|
|
inventory: undercloud
|
|
roles:
|
|
- tripleo-inventory
|
|
|
|
- name: Prepare the host for PXE forwarding
|
|
hosts: virthost
|
|
gather_facts: no
|
|
roles:
|
|
- baremetal-prep-virthost
|
|
|
|
- name: Validate IPMI and instackenv.json
|
|
hosts: undercloud
|
|
gather_facts: yes
|
|
roles:
|
|
- validate-ipmi
|
|
|
|
- name: Install the undercloud
|
|
hosts: undercloud
|
|
gather_facts: no
|
|
roles:
|
|
- tripleo/undercloud
|
|
|
|
- name: copy over config files
|
|
hosts: undercloud
|
|
gather_facts: no
|
|
roles:
|
|
- overcloud-prep-config
|
|
|
|
- name: Perpare the baremetal overcloud
|
|
hosts: undercloud
|
|
gather_facts: yes
|
|
roles:
|
|
- overcloud-prep-baremetal
|
|
|
|
- name: Prepare the overcloud images for deployment
|
|
hosts: undercloud
|
|
gather_facts: no
|
|
roles:
|
|
- overcloud-prep-images
|
|
|
|
- name: Prepare overcloud flavors
|
|
hosts: undercloud
|
|
gather_facts: no
|
|
roles:
|
|
- overcloud-prep-flavors
|
|
|
|
- name: Prepare the undercloud networks for the overcloud deployment
|
|
hosts: undercloud
|
|
gather_facts: no
|
|
roles:
|
|
- overcloud-prep-network
|
|
|
|
- name: Deploy the overcloud
|
|
hosts: undercloud
|
|
gather_facts: no
|
|
roles:
|
|
- tripleo-overcloud
|
|
|
|
# Add the overcloud nodes to the generated inventory.
|
|
- name: Inventory the overcloud
|
|
hosts: undercloud
|
|
gather_facts: yes
|
|
tags:
|
|
- overcloud-deploy
|
|
vars:
|
|
inventory: all
|
|
roles:
|
|
- tripleo-inventory
|
|
|
|
- name: Check the result of the deployment
|
|
hosts: localhost
|
|
tags:
|
|
- overcloud-deploy
|
|
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"
|
|
|
|
- name: validate the overcloud
|
|
hosts: undercloud
|
|
tags:
|
|
- overcloud-validate
|
|
gather_facts: no
|
|
roles:
|
|
- tripleo-overcloud-validate
|