2023-03-27 17:25:55 +08:00
|
|
|
---
|
|
|
|
- name: Check ansible version
|
|
|
|
import_playbook: ansible_version.yml
|
|
|
|
|
|
|
|
- name: Ensure compatibility with old groups
|
|
|
|
import_playbook: legacy_groups.yml
|
|
|
|
|
2023-07-26 22:36:22 +08:00
|
|
|
- name: Install bastion ssh config
|
|
|
|
hosts: bastion[0]
|
2023-03-27 17:25:55 +08:00
|
|
|
gather_facts: False
|
|
|
|
environment: "{{ proxy_disable_env }}"
|
|
|
|
roles:
|
|
|
|
- { role: kubespray-defaults}
|
|
|
|
- { role: bastion-ssh-config, tags: ["localhost", "bastion"]}
|
|
|
|
|
2023-07-26 22:36:22 +08:00
|
|
|
- name: Recover etcd
|
|
|
|
hosts: etcd[0]
|
2023-03-27 17:25:55 +08:00
|
|
|
environment: "{{ proxy_disable_env }}"
|
|
|
|
roles:
|
|
|
|
- { role: kubespray-defaults}
|
|
|
|
- role: recover_control_plane/etcd
|
|
|
|
when: etcd_deployment_type != "kubeadm"
|
|
|
|
|
2023-07-26 22:36:22 +08:00
|
|
|
- name: Recover control plane
|
|
|
|
hosts: kube_control_plane[0]
|
2023-03-27 17:25:55 +08:00
|
|
|
environment: "{{ proxy_disable_env }}"
|
|
|
|
roles:
|
|
|
|
- { role: kubespray-defaults}
|
|
|
|
- { role: recover_control_plane/control-plane }
|
|
|
|
|
2023-07-26 22:36:22 +08:00
|
|
|
- name: Apply whole cluster install
|
|
|
|
import_playbook: cluster.yml
|
2023-03-27 17:25:55 +08:00
|
|
|
|
2023-07-26 22:36:22 +08:00
|
|
|
- name: Perform post recover tasks
|
|
|
|
hosts: kube_control_plane
|
2023-03-27 17:25:55 +08:00
|
|
|
environment: "{{ proxy_disable_env }}"
|
|
|
|
roles:
|
|
|
|
- { role: kubespray-defaults}
|
|
|
|
- { role: recover_control_plane/post-recover }
|