Browse Source

install-kubernetes: fix minikube config permission

It seems like new minikube changed the default minikube config
permission. This change ensures the minikube config is owned by
the ansible_user

Change-Id: Ic1af1541fb1f32253678f989d7b62d21074514d5
changes/82/637682/3
Tristan Cacqueray 3 months ago
parent
commit
3d5ee8637f
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      roles/install-kubernetes/tasks/minikube.yaml

+ 6
- 0
roles/install-kubernetes/tasks/minikube.yaml View File

@@ -44,5 +44,11 @@
44 44
     MINIKUBE_HOME: "{{ ansible_user_dir }}"
45 45
     KUBECONFIG: "{{ ansible_user_dir }}/.kube/config"
46 46
 
47
+- name: Ensure minikube config is owned by ansible_user
48
+  become: yes
49
+  file:
50
+    path: "{{ ansible_user_dir }}/.minikube/client.key"
51
+    owner: "{{ ansible_user }}"
52
+
47 53
 - name: Get cluster info
48 54
   command: kubectl cluster-info

Loading…
Cancel
Save