install-kubernetes: fix missing package, fix the client.key file path
The install-kubernetes role is now failing due to the fact that minikube now requires conntrack. This patch solves this. Change-Id: I1e59d5e9255064646bd8e8c6b6edb2c34d45b516
This commit is contained in:
parent
5627cb77e9
commit
9fc0e3580a
@ -14,6 +14,7 @@
|
|||||||
become: yes
|
become: yes
|
||||||
apt:
|
apt:
|
||||||
name:
|
name:
|
||||||
|
- conntrack
|
||||||
- kubectl
|
- kubectl
|
||||||
- liblz4-tool
|
- liblz4-tool
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
|
@ -64,10 +64,21 @@
|
|||||||
MINIKUBE_HOME: "{{ ansible_user_dir }}"
|
MINIKUBE_HOME: "{{ ansible_user_dir }}"
|
||||||
KUBECONFIG: "{{ ansible_user_dir }}/.kube/config"
|
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
|
- name: Ensure minikube config is owned by ansible_user
|
||||||
become: yes
|
become: yes
|
||||||
|
loop: "{{ kube_config['users'] }}"
|
||||||
|
loop_control:
|
||||||
|
loop_var: item
|
||||||
file:
|
file:
|
||||||
path: "{{ ansible_user_dir }}/.minikube/client.key"
|
path: "{{ item['user']['client-key'] }}"
|
||||||
owner: "{{ ansible_user }}"
|
owner: "{{ ansible_user }}"
|
||||||
|
|
||||||
- name: Get cluster info
|
- name: Get cluster info
|
||||||
|
Loading…
Reference in New Issue
Block a user