This playbook is used to collect ceph-volume and ceph-osd logs from
vms that have failed tests.
We do it this way so that we don't have to clone ceph-build to get at
the playbook we stored in the repo.
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
fi
}
+
+write_collect_logs_playbook() {
+ cat > $WORKSPACE/collect-logs.yml << EOF
+- 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: collect ceph-osd logs
+ fetch:
+ src: "{{ item }}"
+ dest: "{{ archive_path }}"
+ fail_on_missing: no
+ flat: yes
+ failed_when: false
+ with_fileglob:
+ - "/var/log/ceph-osd*"
+EOF
+}