---
- hosts: nodes
  gather_facts: yes
  become: yes
  roles:
  - rhsm-timeout
  - role: atomic-update
    when: openshift.common.is_atomic

- hosts: nodes
  gather_facts: no
  become: yes
  serial: 1
  roles:
  - role: rhsm-subscription
    when: deployment_type in ["enterprise", "atomic-enterprise", "openshift-enterprise"] and
          ansible_distribution == "RedHat" and ( rhsm_user is defined or rhsm_activation_key is defined)

- hosts: nodes
  gather_facts: no
  become: yes
  roles:
  - role: rhsm-repos
    when: deployment_type in ["enterprise", "atomic-enterprise", "openshift-enterprise"] and
          ansible_distribution == "RedHat" and ( rhsm_user is defined or rhsm_activation_key is defined)
  - prerequisites

- hosts: masters
  gather_facts: yes
  become: yes
  roles:
  - master-prerequisites
