From 1a969709183bcef196aa8e266b0942afdcc4e85d Mon Sep 17 00:00:00 2001 From: Matthew Mosesohn Date: Thu, 23 Mar 2017 13:10:42 +0300 Subject: [PATCH] Fix delegate tasks for kubectl and etcdctl --- roles/kubernetes/master/tasks/post-upgrade.yml | 1 + roles/upgrade/pre-upgrade/tasks/main.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/roles/kubernetes/master/tasks/post-upgrade.yml b/roles/kubernetes/master/tasks/post-upgrade.yml index 07fc57b96..391646272 100644 --- a/roles/kubernetes/master/tasks/post-upgrade.yml +++ b/roles/kubernetes/master/tasks/post-upgrade.yml @@ -3,4 +3,5 @@ command: "{{ bin_dir }}/etcdctl --endpoints={{ etcd_access_addresses }} rm -r /registry" environment: ETCDCTL_API: 2 + delegate_to: "{{groups['etcd'][0]}}" when: kube_apiserver_storage_backend == "etcd3" and needs_etcd_migration|bool|default(false) diff --git a/roles/upgrade/pre-upgrade/tasks/main.yml b/roles/upgrade/pre-upgrade/tasks/main.yml index e0e5ded81..fbcd1cf85 100644 --- a/roles/upgrade/pre-upgrade/tasks/main.yml +++ b/roles/upgrade/pre-upgrade/tasks/main.yml @@ -2,6 +2,7 @@ - name: See if node is in ready state command: "kubectl get nodes | grep {{ inventory_hostname }}" register: kubectl_nodes + delegate_to: "{{ groups['kube-master'][0] }}" ignore_errors: true - set_fact: