2019-04-29 08:40:20 +00:00
|
|
|
---
|
|
|
|
- hosts: localhost
|
|
|
|
gather_facts: False
|
2020-03-07 18:17:34 +00:00
|
|
|
become: no
|
2019-04-29 08:40:20 +00:00
|
|
|
tasks:
|
2020-03-07 18:17:34 +00:00
|
|
|
- name: "Check ansible version >=2.7.8"
|
2019-04-29 08:40:20 +00:00
|
|
|
assert:
|
2020-03-07 18:17:34 +00:00
|
|
|
msg: "Ansible must be v2.7.8 or higher"
|
2019-04-29 08:40:20 +00:00
|
|
|
that:
|
2020-03-07 18:17:34 +00:00
|
|
|
- ansible_version.string is version("2.7.8", ">=")
|
2019-04-29 08:40:20 +00: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 }
|