mirror of
https://github.com/ansible/awx.git
synced 2026-03-13 15:09:32 -02:30
Workaround Minikube issue on MacOS and enable preflights
This commit is contained in:
@@ -1,6 +1,10 @@
|
|||||||
---
|
---
|
||||||
sources_dest: '_sources'
|
sources_dest: '_sources'
|
||||||
driver: 'docker'
|
driver: 'docker'
|
||||||
|
addons:
|
||||||
|
- default-storageclass
|
||||||
|
- storage-provisioner
|
||||||
|
- dashboard
|
||||||
|
|
||||||
minikube_url_linux: 'https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64'
|
minikube_url_linux: 'https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64'
|
||||||
minikube_url_macos: 'https://storage.googleapis.com/minikube/releases/latest/minikube-darwin-amd64'
|
minikube_url_macos: 'https://storage.googleapis.com/minikube/releases/latest/minikube-darwin-amd64'
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
---
|
---
|
||||||
|
- name: Include pre-flight checks
|
||||||
|
include_tasks: preflight.yml
|
||||||
|
|
||||||
- name: Create _sources directory
|
- name: Create _sources directory
|
||||||
file:
|
file:
|
||||||
path: "{{ sources_dest }}"
|
path: "{{ sources_dest }}"
|
||||||
@@ -40,7 +43,23 @@
|
|||||||
- ansible_system == "Darwin"
|
- ansible_system == "Darwin"
|
||||||
|
|
||||||
- name: Starting Minikube
|
- name: Starting Minikube
|
||||||
shell: "{{ sources_dest }}/minikube start --driver={{ driver }} --install-addons=true --addons=ingress"
|
shell: "{{ sources_dest }}/minikube start --driver={{ driver }} --install-addons=true --addons={{ addons | join(',') }}"
|
||||||
|
register: minikube_stdout
|
||||||
|
|
||||||
|
- name: Enable Ingress Controller on Minikube
|
||||||
|
shell: "{{ sources_dest }}/minikube addons enable ingress"
|
||||||
|
when:
|
||||||
|
- minikube_stdout.rc == 0
|
||||||
|
register: _minikube_ingress
|
||||||
|
ignore_errors: true
|
||||||
|
|
||||||
|
- name: Show Minikube Ingress known-issue 7332 warning
|
||||||
|
pause:
|
||||||
|
seconds: 5
|
||||||
|
prompt: "The Minikube Ingress addon has been disabled since it looks like you are hitting https://github.com/kubernetes/minikube/issues/7332"
|
||||||
|
when:
|
||||||
|
- '"minikube/issues/7332" in _minikube_ingress.stderr'
|
||||||
|
- ansible_system == "Darwin"
|
||||||
|
|
||||||
- name: Create ServiceAccount and clusterRoleBinding
|
- name: Create ServiceAccount and clusterRoleBinding
|
||||||
k8s:
|
k8s:
|
||||||
|
|||||||
12
tools/docker-compose-minikube/minikube/tasks/preflight.yml
Normal file
12
tools/docker-compose-minikube/minikube/tasks/preflight.yml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
- name: Check if Kubernetes python module is installed
|
||||||
|
shell: pip freeze | grep openshift
|
||||||
|
register: _pip_openshift
|
||||||
|
ignore_errors: true
|
||||||
|
|
||||||
|
- name: Preflight check - require openshift python module
|
||||||
|
assert:
|
||||||
|
fail_msg: "The openshift python module was not found. You can either install it via 'pip install openshift' or using your distro package manager."
|
||||||
|
that:
|
||||||
|
- _pip_openshift.rc == 0
|
||||||
|
- "'openshift==' in _pip_openshift.stdout"
|
||||||
Reference in New Issue
Block a user