2019-04-29 16:40:20 +08:00
|
|
|
---
|
|
|
|
- hosts: localhost
|
|
|
|
gather_facts: False
|
2020-03-08 02:17:34 +08:00
|
|
|
become: no
|
2019-04-29 16:40:20 +08:00
|
|
|
tasks:
|
2020-03-08 02:17:34 +08:00
|
|
|
- name: "Check ansible version >=2.7.8"
|
2019-04-29 16:40:20 +08:00
|
|
|
assert:
|
2020-03-08 02:17:34 +08:00
|
|
|
msg: "Ansible must be v2.7.8 or higher"
|
2019-04-29 16:40:20 +08:00
|
|
|
that:
|
2020-03-08 02:17:34 +08:00
|
|
|
- ansible_version.string is version("2.7.8", ">=")
|
2019-04-29 16:40:20 +08:00
|
|
|
tags:
|
|
|
|
- check
|
|
|
|
vars:
|
|
|
|
ansible_connection: local
|
|
|
|
|
|
|
|
- hosts: bastion[0]
|
|
|
|
gather_facts: False
|
|
|
|
roles:
|
|
|
|
- { role: kubespray-defaults}
|
|
|
|
- { role: bastion-ssh-config, tags: ["localhost", "bastion"]}
|
|
|
|
|
|
|
|
- hosts: "{{ groups['etcd'] | first }}"
|
|
|
|
roles:
|
|
|
|
- { role: kubespray-defaults}
|
|
|
|
- { role: recover_control_plane/etcd }
|
|
|
|
|
|
|
|
- hosts: "{{ groups['kube-master'] | first }}"
|
|
|
|
roles:
|
|
|
|
- { role: recover_control_plane/master }
|
|
|
|
|
|
|
|
- include: cluster.yml
|
|
|
|
|
|
|
|
- hosts: "{{ groups['kube-master'] }}"
|
|
|
|
roles:
|
|
|
|
- { role: kubespray-defaults}
|
|
|
|
- { role: recover_control_plane/post-recover }
|