diff --git a/playbooks/helm/pre.yaml b/playbooks/helm/pre.yaml index 89a2c07..0b3f9bc 100644 --- a/playbooks/helm/pre.yaml +++ b/playbooks/helm/pre.yaml @@ -7,45 +7,15 @@ - role: ensure-helm tasks: - name: Start minikube - command: minikube start --cpus max --memory max + command: minikube start --cpus max --memory max --container-runtime cri-o - - name: Patch minikube docker daemon config to use the buildset registry + - name: Replace minikube registries.conf block: - - name: Load minikube docker daemon config - command: minikube ssh sudo cat /etc/docker/daemon.json - register: daemon_json + - name: Copy registries.conf from the host to minikube + command: minikube cp /etc/containers/registries.conf /etc/containers/registries.conf - - name: Parse docker minikube daemon config - set_fact: - daemon_json_parsed: "{{ daemon_json.stdout | from_json }}" - - - name: Add buildset registry to minikube docker daemon config - vars: - new_entries: - registry-mirrors: "['https://{{ buildset_registry_alias }}:{{ buildset_registry.port }}/']" - set_fact: - new_daemon_json_parsed: "{{ daemon_json_parsed | combine(new_entries) }}" - - - name: Serialise new minikube docker daemon config - set_fact: - new_daemon_json: "{{ new_daemon_json_parsed | to_json }}" - - - name: Save tmp new minikube docker daemon config - copy: - content: "{{ new_daemon_json }}" - dest: /tmp/minikube_docker_daemon.json - mode: 0644 - - - name: Copy new minikube docker daemon config - command: minikube cp /tmp/minikube_docker_daemon.json /etc/docker/daemon.json - - - name: Clean up tmp new minikube docker daemon config - file: - path: /tmp/minikube_docker_daemon.json - state: absent - - - name: Restart minikube docker daemon - command: minikube ssh sudo systemctl restart docker + - name: Restart minikube crio daemon + command: minikube ssh sudo systemctl restart crio - name: Wait for minikube k8s API to be back up command: kubectl get node