k8-logs: use failed_when: instead of ignore_errors:

Change-Id: Ifd4652cdb198ac6cc40edb2254967d08104baa30
This commit is contained in:
Albin Vass 2020-04-27 20:51:30 +02:00
parent e863680df7
commit 605fb74921

View File

@ -1,7 +1,7 @@
- name: List pods - name: List pods
command: "kubectl get pod -o=custom-columns=NAME:.metadata.name --no-headers" command: "kubectl get pod -o=custom-columns=NAME:.metadata.name --no-headers"
register: podlist register: podlist
ignore_errors: true failed_when: false
- name: Create pod describe dir - name: Create pod describe dir
file: file:
@ -15,7 +15,7 @@
shell: "kubectl describe po {{ pod_name }} &> {{ ansible_user_dir }}/zuul-output/logs/pods/{{ pod_name }}.txt" shell: "kubectl describe po {{ pod_name }} &> {{ ansible_user_dir }}/zuul-output/logs/pods/{{ pod_name }}.txt"
args: args:
executable: /bin/bash executable: /bin/bash
ignore_errors: true failed_when: false
- name: Open pod descriptions permissions - name: Open pod descriptions permissions
file: file:
@ -32,7 +32,7 @@
shell: "journalctl -u kubelet &> {{ ansible_user_dir }}/zuul-output/logs/kubelet/kubelet.txt" shell: "journalctl -u kubelet &> {{ ansible_user_dir }}/zuul-output/logs/kubelet/kubelet.txt"
args: args:
executable: /bin/bash executable: /bin/bash
ignore_errors: true failed_when: false
become: yes become: yes
- name: Open kubelet logs permissions - name: Open kubelet logs permissions