a016dcba18
This change enables using a particular version of minikube for debugging purpose. Change-Id: Ide264165f12185e8313a16b6b6286ab74b32aa15
49 lines
1.2 KiB
YAML
49 lines
1.2 KiB
YAML
- name: Check for Minikube install
|
|
stat:
|
|
path: /tmp/minikube
|
|
register: stat_result
|
|
|
|
- name: Download Minikube
|
|
get_url:
|
|
url: https://storage.googleapis.com/minikube/releases/{{ minikube_version }}/minikube-linux-amd64
|
|
dest: /tmp/minikube
|
|
mode: 0755
|
|
when: stat_result.stat.exists == False
|
|
|
|
- name: Run install-docker role
|
|
include_role:
|
|
name: install-docker
|
|
|
|
- name: Create .kube directory
|
|
file:
|
|
path: "{{ ansible_user_dir }}/.kube"
|
|
state: directory
|
|
mode: 0755
|
|
|
|
- name: Create .kube/config file
|
|
file:
|
|
path: "{{ ansible_user_dir }}/.kube/config"
|
|
state: touch
|
|
mode: 0644
|
|
|
|
- name: Create .minikube directory
|
|
file:
|
|
path: "{{ ansible_user_dir }}/.minikube"
|
|
state: directory
|
|
mode: 0755
|
|
|
|
- name: Start Minikube
|
|
become: yes
|
|
command: /tmp/minikube --vm-driver=none start
|
|
environment:
|
|
MINIKUBE_WANTUPDATENOTIFICATION: false
|
|
MINIKUBE_WANTREPORTERRORPROMPT: false
|
|
MINIKUBE_WANTNONEDRIVERWARNING: false
|
|
MINIKUBE_WANTKUBECTLDOWNLOADMSG: false
|
|
CHANGE_MINIKUBE_NONE_USER: true
|
|
MINIKUBE_HOME: "{{ ansible_user_dir }}"
|
|
KUBECONFIG: "{{ ansible_user_dir }}/.kube/config"
|
|
|
|
- name: Get cluster info
|
|
command: kubectl cluster-info
|