tripleo-quickstart/playbooks/tripleo-roles.yml
Gael Chamoulaud 77e537f868 Add blank newline at the end of file
This patch adds blank newline for each [yaml|sh] files if they
don't end with one. This will allows us getting linters happy and avoid us
having git adding "\ No newline at end of file" in diffs when pushing
a new patch.

In other way, you can configure Git to properly handle line endings in
typing:

$ git config --global core.autocrlf input

Change-Id: I8a113541b3eae6a36ed32995822dedbbd2d9666e
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
2017-03-27 10:40:32 +02:00

99 lines
2.6 KiB
YAML

# Add the virthost to the in-memory inventory. The inventory is not
# wirtten 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
- include: teardown-provision.yml
# The [provision.yml](provision.yml.html) 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
# The `libvirt/setup` role creates the undercloud and overcloud
# virtual machines.
- name: Setup undercloud and overcloud vms
hosts: virthost
gather_facts: yes
roles:
- libvirt/setup
- name: Add the undercloud node to the generated inventory
hosts: localhost
gather_facts: yes
roles:
- tripleo-inventory
- name: Install the undercloud
hosts: undercloud
gather_facts: no
roles:
- tripleo/undercloud
- name: Post undercloud install steps
hosts: undercloud
gather_facts: no
roles:
- tripleo-undercloud-post
- name: Deploy the overcloud
hosts: undercloud
gather_facts: no
roles:
- tripleo-overcloud
- name: Add the overcloud nodes to the generated inventory
hosts: undercloud
gather_facts: yes
vars:
inventory: all
roles:
- tripleo-inventory
# to-do replace this with a role that debugs
# the deployment based on the results
- 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
gather_facts: no
roles:
- tripleo-overcloud-validate