Fix delegate tasks for kubectl and etcdctl
This commit is contained in:
parent
bf3425322f
commit
1a96970918
2 changed files with 2 additions and 0 deletions
|
@ -3,4 +3,5 @@
|
||||||
command: "{{ bin_dir }}/etcdctl --endpoints={{ etcd_access_addresses }} rm -r /registry"
|
command: "{{ bin_dir }}/etcdctl --endpoints={{ etcd_access_addresses }} rm -r /registry"
|
||||||
environment:
|
environment:
|
||||||
ETCDCTL_API: 2
|
ETCDCTL_API: 2
|
||||||
|
delegate_to: "{{groups['etcd'][0]}}"
|
||||||
when: kube_apiserver_storage_backend == "etcd3" and needs_etcd_migration|bool|default(false)
|
when: kube_apiserver_storage_backend == "etcd3" and needs_etcd_migration|bool|default(false)
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
- name: See if node is in ready state
|
- name: See if node is in ready state
|
||||||
command: "kubectl get nodes | grep {{ inventory_hostname }}"
|
command: "kubectl get nodes | grep {{ inventory_hostname }}"
|
||||||
register: kubectl_nodes
|
register: kubectl_nodes
|
||||||
|
delegate_to: "{{ groups['kube-master'][0] }}"
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
- set_fact:
|
- set_fact:
|
||||||
|
|
Loading…
Reference in a new issue