Merge "install-kubernetes: fix missing package, fix the client.key file path"

This commit is contained in:
Zuul 2020-03-27 19:35:48 +00:00 committed by Gerrit Code Review
commit 4b23fe8b64
2 changed files with 13 additions and 1 deletions

View File

@ -14,6 +14,7 @@
become: yes
apt:
name:
- conntrack
- kubectl
- liblz4-tool
update_cache: yes

View File

@ -64,10 +64,21 @@
MINIKUBE_HOME: "{{ ansible_user_dir }}"
KUBECONFIG: "{{ ansible_user_dir }}/.kube/config"
- name: Get KUBECONFIG
command: "kubectl config view"
register: kubeconfig_yaml
- name: Parse KUBECONFIG YAML
set_fact:
kube_config: "{{ kubeconfig_yaml.stdout | from_yaml }}"
- name: Ensure minikube config is owned by ansible_user
become: yes
loop: "{{ kube_config['users'] }}"
loop_control:
loop_var: item
file:
path: "{{ ansible_user_dir }}/.minikube/client.key"
path: "{{ item['user']['client-key'] }}"
owner: "{{ ansible_user }}"
- name: Get cluster info