Collect more minikube logs
Change-Id: I0de07ab45c08b80427b018455879724ff239ddb1
This commit is contained in:
parent
bb5c04b369
commit
5b6cdd4350
@ -1,5 +1,6 @@
|
|||||||
- hosts: all
|
- hosts: all
|
||||||
roles:
|
roles:
|
||||||
- collect-container-logs # for some of minikube logs
|
- collect-container-logs # for some of minikube logs
|
||||||
|
- collect-minikube-logs
|
||||||
- collect-kubernetes-state
|
- collect-kubernetes-state
|
||||||
- collect-kubernetes-pods-logs
|
- collect-kubernetes-pods-logs
|
||||||
|
23
roles/collect-minikube-logs/tasks/main.yaml
Normal file
23
roles/collect-minikube-logs/tasks/main.yaml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
- name: Create minikube logs dir
|
||||||
|
file:
|
||||||
|
path: "{{ ansible_user_dir }}/zuul-output/logs/minikube"
|
||||||
|
state: directory
|
||||||
|
mode: 0755
|
||||||
|
|
||||||
|
- name: Collect default minikube logs
|
||||||
|
shell: "minikube logs > {{ ansible_user_dir }}/zuul-output/logs/minikube/minikube.txt"
|
||||||
|
failed_when: false
|
||||||
|
|
||||||
|
- name: Collect all minikube cri-o logs
|
||||||
|
shell: "minikube ssh 'sudo journalctl -u crio' > {{ ansible_user_dir }}/zuul-output/logs/minikube/crio.txt"
|
||||||
|
failed_when: false
|
||||||
|
|
||||||
|
- name: Collect all minikube kubelet logs
|
||||||
|
shell: "minikube ssh 'sudo journalctl -u kubelet' > {{ ansible_user_dir }}/zuul-output/logs/minikube/kubelet.txt"
|
||||||
|
failed_when: false
|
||||||
|
|
||||||
|
- name: Open minikube logs permissions
|
||||||
|
file:
|
||||||
|
dest: "{{ ansible_user_dir }}/zuul-output/logs/minikube"
|
||||||
|
mode: u=rwX,g=rX,o=rX
|
||||||
|
recurse: true
|
Loading…
Reference in New Issue
Block a user