From 09fe95bc60b4d53364d3e4aa4846284786a3f94f Mon Sep 17 00:00:00 2001
From: Matthew Mosesohn <matthew.mosesohn@gmail.com>
Date: Mon, 22 Apr 2019 01:27:43 +0300
Subject: [PATCH] Avoid creating k8s cert dir on non-k8s nodes (#4602)

---
 roles/kubernetes/preinstall/tasks/0050-create_directories.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/roles/kubernetes/preinstall/tasks/0050-create_directories.yml b/roles/kubernetes/preinstall/tasks/0050-create_directories.yml
index 53c5408e1..93b95a32b 100644
--- a/roles/kubernetes/preinstall/tasks/0050-create_directories.yml
+++ b/roles/kubernetes/preinstall/tasks/0050-create_directories.yml
@@ -29,6 +29,7 @@
     dest: "{{ kube_cert_compat_dir }}"
     state: link
   when:
+    - inventory_hostname in groups['k8s-cluster']
     - kube_cert_dir != kube_cert_compat_dir
 
 - name: Create cni directories
-- 
GitLab