Fix namespace speicification in collect-kubernetes-logs role
Change-Id: Icff4ac0d0c09b8c314bcd96289db4b1710e8ecb3
This commit is contained in:
parent
5c37f3fd89
commit
9baf749f6d
@ -1,5 +1,5 @@
|
|||||||
- name: List pods
|
- name: List pods
|
||||||
command: "kubectl get pod {% if collect_kubernetes_logs_namespace %}-n {{ collect_kubernetes_logs_namespace }}{% endif %} -o=custom-columns=NAME:.metadata.name --no-headers"
|
command: "kubectl get pod {% if collect_kubernetes_logs_namespace is defined %}-n {{ collect_kubernetes_logs_namespace }}{% endif %} -o=custom-columns=NAME:.metadata.name --no-headers"
|
||||||
register: podlist
|
register: podlist
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
|
||||||
@ -12,7 +12,7 @@
|
|||||||
loop: "{{ podlist.stdout_lines | default([]) }}"
|
loop: "{{ podlist.stdout_lines | default([]) }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
loop_var: zj_pod_name
|
loop_var: zj_pod_name
|
||||||
shell: "kubectl describe po {{ zj_pod_name }} {% if collect_kubernetes_logs_namespace %}-n {{ collect_kubernetes_logs_namespace }}{% endif %} &> {{ ansible_user_dir }}/zuul-output/logs/pods/{{ zj_pod_name }}.txt"
|
shell: "kubectl describe po {{ zj_pod_name }} {% if collect_kubernetes_logs_namespace is defined %}-n {{ collect_kubernetes_logs_namespace }}{% endif %} &> {{ ansible_user_dir }}/zuul-output/logs/pods/{{ zj_pod_name }}.txt"
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
Loading…
Reference in New Issue
Block a user