From 97a8cc9837d9c35ff678b40d30b0701198f4aeda Mon Sep 17 00:00:00 2001 From: Andrew Schoen Date: Thu, 8 Mar 2018 13:12:11 -0600 Subject: [PATCH] collect-logs: use find to get all remote ceph logs to fetch Signed-off-by: Andrew Schoen --- scripts/build_utils.sh | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/scripts/build_utils.sh b/scripts/build_utils.sh index 77373fba..1a30593b 100644 --- a/scripts/build_utils.sh +++ b/scripts/build_utils.sh @@ -683,24 +683,17 @@ write_collect_logs_playbook() { - hosts: all become: yes tasks: - - name: collect ceph-volume logs - fetch: - src: "{{ item }}" - dest: "{{ archive_path }}" - fail_on_missing: no - flat: yes - failed_when: false - with_fileglob: - - "/var/log/ceph-volume*" + - name: find ceph logs + command: find /var/log/ceph -name "ceph*.log" + register: ceph_logs - - name: collect ceph-osd logs + - name: collect ceph logs fetch: src: "{{ item }}" dest: "{{ archive_path }}" fail_on_missing: no flat: yes failed_when: false - with_fileglob: - - "/var/log/ceph-osd*" + with_items: "{{ ceph_logs.stdout_lines }}" EOF } -- 2.39.5