---
- import_playbook: hook/pre_install.yaml

- import_playbook: precheck.yaml

- import_playbook: init_os.yaml

# install
- hosts:
    - nfs
  gather_facts: true
  roles:
    - install/nfs

- hosts:
    - etcd
  gather_facts: true
  roles:
    - install/etcd

- hosts:
    - image_registry
  gather_facts: true
  roles:
    - install/image-registry

- hosts:
    - k8s_cluster
  vars_files:
    - vars/create_cluster_kubernetes.yaml
  gather_facts: true
  roles:
    - install/cri
    - install/kubernetes

- hosts:
    - kube_control_plane
  roles:
    - role: install/certs
      when: .renew_certs.enabled

- hosts:
    - kube_control_plane|random
  roles:
    - addons/cni
    - addons/kata
    - addons/nfd
    - addons/sc

- import_playbook: hook/post_install.yaml
