From 19856cf692b44285dc1ac188b14ca3c04950df0c Mon Sep 17 00:00:00 2001
From: Kay Yan <yankay@users.noreply.github.com>
Date: Wed, 29 Mar 2023 12:01:24 +0800
Subject: [PATCH] fix-kube-bench-1.1.19 (#9937)

---
 roles/kubernetes/preinstall/tasks/0050-create_directories.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/roles/kubernetes/preinstall/tasks/0050-create_directories.yml b/roles/kubernetes/preinstall/tasks/0050-create_directories.yml
index 35d7e04df..09d283dcc 100644
--- a/roles/kubernetes/preinstall/tasks/0050-create_directories.yml
+++ b/roles/kubernetes/preinstall/tasks/0050-create_directories.yml
@@ -19,12 +19,11 @@
     - node
   with_items:
     - "{{ kube_config_dir }}"
-    - "{{ kube_cert_dir }}"
     - "{{ kube_manifest_dir }}"
     - "{{ kube_script_dir }}"
     - "{{ kubelet_flexvolumes_plugins_dir }}"
 
-- name: Create other directories
+- name: Create other directories of root owner
   file:
     path: "{{ item }}"
     state: directory
@@ -43,6 +42,7 @@
     - master
     - node
   with_items:
+    - "{{ kube_cert_dir }}"
     - "{{ bin_dir }}"
 
 - name: Check if kubernetes kubeadm compat cert dir exists
-- 
GitLab