83 lines
2.2 KiB
YAML
83 lines
2.2 KiB
YAML
---
|
|
# This is the playbook used by the `quickstart.sh` script.
|
|
|
|
# Add the virthost to the in-memory inventory. The inventory is not
|
|
# written out to disk unless you call the `tripleo-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 }}"
|
|
tags:
|
|
- provision
|
|
- teardown-all
|
|
- teardown-nodes
|
|
- teardown-provision
|
|
- teardown-environment
|
|
|
|
- import_playbook: 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.
|
|
- import_playbook: 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`.
|
|
- import_playbook: teardown-nodes.yml
|
|
- import_playbook: 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
|
|
gather_facts: true
|
|
tags:
|
|
- environment
|
|
roles:
|
|
- environment/setup
|
|
|
|
# The `libvirt/setup` role creates the undercloud and overcloud
|
|
# virtual machines.
|
|
- name: Setup undercloud, overcloud, and supplemental vms
|
|
hosts: virthost
|
|
gather_facts: true
|
|
tags:
|
|
- libvirt
|
|
roles:
|
|
- libvirt/setup
|
|
|
|
|
|
- name: Add the undercloud node to the generated inventory
|
|
hosts: localhost
|
|
gather_facts: true
|
|
tags:
|
|
- undercloud-inventory
|
|
roles:
|
|
- tripleo-inventory
|
|
|
|
# Make sure the undercloud is up before we collect facts
|
|
- name: Wait until ssh is available on undercloud node
|
|
gather_facts: false
|
|
hosts: undercloud
|
|
tasks:
|
|
- name: Wait for undercloud to be ssh-able
|
|
wait_for_connection:
|
|
timeout: 300
|
|
|
|
# Setup the virtual bmc
|
|
# This must be done after inventory is run for the first time
|
|
- name: Create the virtual BMC
|
|
hosts: undercloud
|
|
gather_facts: true
|
|
tags:
|
|
- libvirt
|
|
roles:
|
|
- virtbmc
|