---
# Non local deployments by quickstart
- name: Install delorian repos
  hosts: overcloud
  any_errors_fatal: true
  gather_facts: false
  become: true
  vars_files:
    - ../vars/overcloud-traas.yaml
  roles:
    - {role: repo-setup,  when: configure_repos|bool}

- name: Run overcloud prep roles
  hosts: undercloud
  any_errors_fatal: true
  vars_files:
    - ../vars/overcloud-traas.yaml
  gather_facts: false
  become: true
  roles:
    - overcloud-prep-config
    - overcloud-prep-containers

- name:  Deploy the overcloud (multinode)
  any_errors_fatal: true
  hosts: undercloud
  gather_facts: true
  become: false
  vars_files:
    - ../vars/overcloud-traas.yaml
  roles:
    - overcloud-deploy
  #TODO parametrize env vars for the deployed-server remaining roles
  #NOTE FooCustomRoleName_hosts must be explicitely exported
  environment:
    ControllerDeployedServer_hosts: "{{ lookup('env', 'CONTROLLER_HOSTS') }}"
    SUBNODES_SSH_KEY: "{{subnodes_ssh_key}}"
    OVERCLOUD_SSH_USER: "{{ssh_user}}"

---
# Non local deployments by quickstart
- name: Install delorian repos
  hosts: overcloud
  any_errors_fatal: true
  gather_facts: false
  become: true
  vars_files:
    - ../vars/overcloud-traas.yaml
  roles:
    - {role: repo-setup,  when: configure_repos|bool}

- name: Run overcloud prep roles
  hosts: undercloud
  any_errors_fatal: true
  vars_files:
    - ../vars/overcloud-traas.yaml
  gather_facts: false
  become: true
  roles:
    - overcloud-prep-config
    - overcloud-prep-containers

- name: Make overcloud-status to not fail
  hosts: localhost
  any_errors_fatal: true
  gather_facts: false
  become: true
  vars_files:
    - ../vars/overcloud-traas.yaml
  tasks:
    - file:
        state: directory
        path: /home/{{ ssh_user }}
        owner: "{{ lookup('env', 'USER') }}"

- name:  Deploy the overcloud (multinode)
  any_errors_fatal: true
  hosts: undercloud
  gather_facts: true
  become: false
  vars_files:
    - ../vars/overcloud-traas.yaml
  roles:
    - overcloud-deploy
  #TODO parametrize env vars for the deployed-server remaining roles
  #NOTE FooCustomRoleName_hosts must be explicitely exported
  environment:
    ControllerDeployedServer_hosts: "{{ lookup('env', 'CONTROLLER_HOSTS') }}"
    SUBNODES_SSH_KEY: "{{subnodes_ssh_key}}"
    OVERCLOUD_SSH_USER: "{{ssh_user}}"

Make overcloud-status to not fail
Make overcloud-status to not fail

Signed-off-by: Bogdan Dobrelya <62b3a3e71fe69d786a0eb2bf561b6ce08e31d2cc@mail.ru>
