blob: f75ae3b155c30976d854bdfb866e03a9dbce93f4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
---
- name: Verify all masters has etcd3 storage backend set
hosts: oo_masters_to_config
gather_facts: no
roles:
- lib_utils
tasks:
- name: Read master storage backend setting
yedit:
state: list
src: /etc/origin/master/master-config.yaml
key: kubernetesMasterConfig.apiServerArguments.storage-backend
register: _storage_backend
- fail:
msg: "Storage backend in /etc/origin/master/master-config.yaml must be set to 'etcd3' before the upgrade can continue"
when:
# assuming the master-config.yml is properly configured, i.e. the value is a list
- _storage_backend.result | default([], true) | length == 0 or _storage_backend.result[0] != "etcd3"
- debug:
msg: "Storage backend is set to etcd3"
|