From ab8760cc83a6bb6f9e33723e6348fe30bbb358c8 Mon Sep 17 00:00:00 2001 From: avoidik Date: Sat, 31 Mar 2018 03:24:57 +0300 Subject: [PATCH] Move credentials pre-check --- roles/kubernetes/node/tasks/main.yml | 8 ++++++++ roles/kubernetes/preinstall/tasks/main.yml | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/roles/kubernetes/node/tasks/main.yml b/roles/kubernetes/node/tasks/main.yml index 78e6d92d6..defd3e9f7 100644 --- a/roles/kubernetes/node/tasks/main.yml +++ b/roles/kubernetes/node/tasks/main.yml @@ -134,6 +134,14 @@ tags: - kube-proxy +- include_tasks: "{{ cloud_provider }}-credential-check.yml" + when: + - cloud_provider is defined + - cloud_provider in [ 'openstack', 'azure', 'vsphere' ] + tags: + - cloud-provider + - facts + - name: Write cloud-config template: src: "{{ cloud_provider }}-cloud-config.j2" diff --git a/roles/kubernetes/preinstall/tasks/main.yml b/roles/kubernetes/preinstall/tasks/main.yml index aca0c9606..4b948831a 100644 --- a/roles/kubernetes/preinstall/tasks/main.yml +++ b/roles/kubernetes/preinstall/tasks/main.yml @@ -71,14 +71,6 @@ - cloud-provider - facts -- include_tasks: "{{ cloud_provider }}-credential-check.yml" - when: - - cloud_provider is defined - - cloud_provider in [ 'openstack', 'azure', 'vsphere' ] - tags: - - cloud-provider - - facts - - name: Create cni directories file: path: "{{ item }}"