|
@ -7,11 +7,9 @@ |
|
|
debug: false |
|
|
debug: false |
|
|
commands: |
|
|
commands: |
|
|
- name: git_info |
|
|
- name: git_info |
|
|
cmd: cat {kargo,.}/.git/logs/HEAD |
|
|
|
|
|
|
|
|
cmd: find . -type d -name .git -execdir sh -c 'gen-gitinfos.sh global|head -12' \; |
|
|
- name: timedate_info |
|
|
- name: timedate_info |
|
|
cmd: timedatectl status |
|
|
cmd: timedatectl status |
|
|
- name: boots_info |
|
|
|
|
|
cmd: journalctl --list-boots --utc --no-pager |
|
|
|
|
|
- name: space_info |
|
|
- name: space_info |
|
|
cmd: df -h |
|
|
cmd: df -h |
|
|
- name: kernel_info |
|
|
- name: kernel_info |
|
@ -28,10 +26,10 @@ |
|
|
cmd: ps auxf | grep -v ]$ |
|
|
cmd: ps auxf | grep -v ]$ |
|
|
- name: systemctl_info |
|
|
- name: systemctl_info |
|
|
cmd: systemctl status |
|
|
cmd: systemctl status |
|
|
|
|
|
- name: systemctl_failed_info |
|
|
|
|
|
cmd: systemctl --state=failed --no-pager |
|
|
- name: k8s_info |
|
|
- name: k8s_info |
|
|
cmd: kubectl get all --all-namespaces -o wide |
|
|
cmd: kubectl get all --all-namespaces -o wide |
|
|
- name: k8s_dump_info |
|
|
|
|
|
cmd: kubectl get all --all-namespaces -o yaml |
|
|
|
|
|
- name: errors_info |
|
|
- name: errors_info |
|
|
cmd: journalctl -p err --utc --no-pager |
|
|
cmd: journalctl -p err --utc --no-pager |
|
|
|
|
|
|
|
@ -43,10 +41,6 @@ |
|
|
- /var/log/kern.log |
|
|
- /var/log/kern.log |
|
|
- inventory/inventory.ini |
|
|
- inventory/inventory.ini |
|
|
- cluster.yml |
|
|
- cluster.yml |
|
|
- kargo/kargo_default_ubuntu.yaml |
|
|
|
|
|
- kargo/kargo_default_debian.yaml |
|
|
|
|
|
- kargo/kargo_default_common.yaml |
|
|
|
|
|
- kargo/inventory/inventory.cfg |
|
|
|
|
|
|
|
|
|
|
|
tasks: |
|
|
tasks: |
|
|
- name: Storing commands output |
|
|
- name: Storing commands output |
|
@ -68,4 +62,9 @@ |
|
|
with_items: "{{logs}}" |
|
|
with_items: "{{logs}}" |
|
|
|
|
|
|
|
|
- name: Pack results and logs |
|
|
- name: Pack results and logs |
|
|
local_action: shell GZIP=-9 tar cvzf logs.tar.gz -C /tmp collect-info |
|
|
|
|
|
|
|
|
local_action: shell GZIP=-9 tar --remove-files -cvzf logs.tar.gz -C /tmp collect-info |
|
|
|
|
|
run_once: true |
|
|
|
|
|
|
|
|
|
|
|
- name: Clean up collected command outputs |
|
|
|
|
|
file: path={{ item.name }} state=absent |
|
|
|
|
|
with_items: "{{commands}}" |