ceph-ansible/infrastructure-playbooks/gather-ceph-logs.yml

39 lines
814 B
YAML

- hosts:
- mons
- osds
- mdss
- rgws
- nfss
- rbdmirrors
- clients
- mgrs
- iscsigws
gather_facts: false
become: yes
tasks:
- name: create a temp directory
local_action:
module: tempfile
state: directory
prefix: ceph_ansible
run_once: true
register: localtempfile
become: false
- name: set_fact lookup_ceph_config - lookup keys, conf and logs
find:
paths:
- /etc/ceph
- /var/log/ceph
register: ceph_collect
- name: collect ceph logs, config and keys in "{{ localtempfile.path }}" on the machine running ansible
fetch:
src: "{{ item.path }}"
dest: "{{ localtempfile.path }}"
fail_on_missing: no
flat: no
with_items: "{{ ceph_collect.files }}"