- 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: Ensure minikube config is owned by ansible_user become: yes file: path: "{{ ansible_user_dir }}/.minikube/client.key" owner: "{{ ansible_user }}" - name: Get cluster info command: kubectl cluster-info