---
- name: GlusterFS Upgrade Checkpoint Start
  hosts: oo_all_hosts
  gather_facts: false
  tasks:
  - name: Set GlusterFS upgrade 'In Progress'
    run_once: true
    set_stats:
      data:
        installer_phase_glusterfs:
          title: "GlusterFS Upgrade"
          playbook: "playbooks/openshift-glusterfs/upgrade.yml"
          status: "In Progress"
          start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"

- name: Upgrade GlusterFS
  hosts: oo_first_master
  tasks:
  - name: Run glusterfs upgrade role
    import_role:
      name: openshift_storage_glusterfs
      tasks_from: upgrade.yml

- import_playbook: setup_nodes.yml

- name: GlusterFS Upgrade Checkpoint End
  hosts: oo_all_hosts
  gather_facts: false
  tasks:
  - name: Set GlusterFS upgrade 'Complete'
    run_once: true
    set_stats:
      data:
        installer_phase_glusterfs:
          status: "Complete"
          end: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
