mirror of https://github.com/ceph/ceph-ansible.git
40 lines
871 B
YAML
40 lines
871 B
YAML
---
|
|
- name: Gather ceph logs
|
|
hosts:
|
|
- mons
|
|
- osds
|
|
- mdss
|
|
- rgws
|
|
- nfss
|
|
- rbdmirrors
|
|
- clients
|
|
- mgrs
|
|
|
|
gather_facts: false
|
|
become: true
|
|
|
|
tasks:
|
|
- name: Create a temp directory
|
|
ansible.builtin.tempfile:
|
|
state: directory
|
|
prefix: ceph_ansible
|
|
run_once: true
|
|
register: localtempfile
|
|
become: false
|
|
delegate_to: localhost
|
|
|
|
- name: Set_fact lookup_ceph_config - lookup keys, conf and logs
|
|
ansible.builtin.find:
|
|
paths:
|
|
- /etc/ceph
|
|
- /var/log/ceph
|
|
register: ceph_collect
|
|
|
|
- name: Collect ceph logs, config and keys on the machine running ansible
|
|
ansible.builtin.fetch:
|
|
src: "{{ item.path }}"
|
|
dest: "{{ localtempfile.path }}"
|
|
fail_on_missing: false
|
|
flat: false
|
|
with_items: "{{ ceph_collect.files }}"
|