---
- name: Deploy the undercloud
  hosts: undercloud
  gather_facts: true
  roles:
    - undercloud-deploy
  tags:
    - undercloud-deploy

- name: Configure tripleo-validations
  hosts: undercloud
  gather_facts: false
  tags:
    - tripleo-validations
  vars:
    run_tripleo_validations_setup: true
  roles:
    - {role: tripleo-validations,
       when: run_tripleo_validations|bool or run_tripleo_validations_negative_tests|bool}

- name: Validate the undercloud
  hosts: undercloud
  roles:
    - {role: validate-undercloud,
       when: run_validate_undercloud|default(false)|bool}
  tags:
    - validate-undercloud

- name: Build images for quickstart
  hosts: undercloud
  gather_facts: false
  roles:
    - {role: build-images, when: to_build|default(false)|bool}
  tags:
    - get-images
    - images
