2017-03-06 10:22:13 +00:00
|
|
|
---
|
2017-03-24 15:29:28 +00:00
|
|
|
- name: "Post-upgrade | restart kubelet on all masters"
|
|
|
|
service:
|
|
|
|
name: kubelet
|
|
|
|
state: restarted
|
|
|
|
delegate_to: "{{item}}"
|
|
|
|
with_items: "{{groups['kube-master']}}"
|
|
|
|
register: kube_apiserver_manifest_replaced
|
|
|
|
when: needs_etcd_migration|bool
|
|
|
|
|
2017-03-06 10:22:13 +00:00
|
|
|
- name: "Post-upgrade | etcd3 upgrade | purge etcd2 k8s data"
|
|
|
|
command: "{{ bin_dir }}/etcdctl --endpoints={{ etcd_access_addresses }} rm -r /registry"
|
|
|
|
environment:
|
|
|
|
ETCDCTL_API: 2
|
2017-03-23 10:10:42 +00:00
|
|
|
delegate_to: "{{groups['etcd'][0]}}"
|
2017-03-23 16:19:51 +00:00
|
|
|
run_once: true
|
2017-03-06 10:22:13 +00:00
|
|
|
when: kube_apiserver_storage_backend == "etcd3" and needs_etcd_migration|bool|default(false)
|