Collect more minikube logs

Change-Id: I0de07ab45c08b80427b018455879724ff239ddb1
This commit is contained in:
Radosław Piliszek 2024-02-15 11:36:03 +01:00
parent bb5c04b369
commit 5b6cdd4350
2 changed files with 24 additions and 0 deletions

View File

@ -1,5 +1,6 @@
- hosts: all
roles:
- collect-container-logs # for some of minikube logs
- collect-minikube-logs
- collect-kubernetes-state
- collect-kubernetes-pods-logs

View 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