---
- name: Upgrade is in tech preview
  hosts: all
  gather_facts: False
  become: False
  tasks:
    - name: Check if user acknowledged that upgrade playbook is in tech preview
      fail:
        msg: "Upgrade playbook is in tech preview, please define var openshift_storage_gluster_update_techpreview=true to proceed"
      run_once: True
      when: not openshift_storage_gluster_update_techpreview | default('false') | bool

- import_playbook: ../init/main.yml
  vars:
    # We need facts on all nodes since we need to check (on RPM installs) that
    # glusterfs-fuse is up to date across the cluster.
    l_init_fact_hosts: "oo_masters_to_config:oo_nodes_to_config"
    l_openshift_version_set_hosts: "oo_masters_to_config:!oo_first_master"
    l_glusterfs_nodes: "{{ groups['oo_nodes_to_config'] | intersect(groups['oo_glusterfs_to_config']) }}"
    l_sanity_check_hosts: "{{ groups['oo_masters_to_config'] | union(l_glusterfs_nodes) }}"
    l_install_base_packages: False
    l_base_packages_hosts: "all:!all"

- import_playbook: private/upgrade.yml
