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:
Mohammed Naser 2020-03-27 08:58:34 -04:00 committed by okozachenko
parent 5627cb77e9
commit 9fc0e3580a
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