Add kubeconfig path to add_host I suspect the ansible kubectl plugin is using Zuul's env var, not the KUBECONFIG env var set at the top of the playbook. To make sure it's using our actual kubeconfig, set it explicitly in the add_host task. Change-Id: Ic80a358a968d32fdd197126007701a3a0714879a
diff --git a/playbooks/deploy.yaml b/playbooks/deploy.yaml index 47dfe98..4172e37 100644 --- a/playbooks/deploy.yaml +++ b/playbooks/deploy.yaml
@@ -128,6 +128,7 @@ - name: Add scheduler to inventory add_host: name: 'zuul-scheduler-0' + ansible_kubectl_config: "{{ ansible_user_dir }}/.kube/config" ansible_kubectl_namespace: zuul ansible_connection: kubectl - name: Wait until remote Zuul config is updated