---
###############################################################################
# Pre upgrade checks for known data problems, if this playbook fails you should
# contact support. If you're not supported contact users@lists.openshift.com
###############################################################################
- name: Verify 3.7 specific upgrade checks
  hosts: oo_first_master
  roles:
  - { role: lib_openshift }
  tasks:
  - name: Check for invalid namespaces and SDN errors
    oc_objectvalidator:

---
###############################################################################
# Pre upgrade checks for known data problems, if this playbook fails you should
# contact support. If you're not supported contact users@lists.openshift.com
###############################################################################
- name: Verify 3.7 specific upgrade checks
  hosts: oo_first_master
  roles:
  - { role: lib_openshift }

  tasks:
  - name: Check for invalid namespaces and SDN errors
    oc_objectvalidator:

  - name: Confirm OpenShift authorization objects are in sync
    command: >
      {{ openshift.common.client_binary }} adm migrate authorization
    changed_when: false
    register: l_oc_result
    until: l_oc_result.rc == 0
    retries: 4
    delay: 15

Upgrade check for OpenShift authorization objects
Upgrade check for OpenShift authorization objects

Adds task to run `oc adm migrate authorization` to ensure OpenShift
authorization objects are in sync.

Fixes #5021
