2024-02-14 18:14:02 +08:00
|
|
|
---
|
|
|
|
- name: Gather ceph logs
|
|
|
|
hosts:
|
|
|
|
- mons
|
|
|
|
- osds
|
|
|
|
- mdss
|
|
|
|
- rgws
|
|
|
|
- nfss
|
|
|
|
- rbdmirrors
|
|
|
|
- clients
|
|
|
|
- mgrs
|
2018-05-25 01:47:29 +08:00
|
|
|
|
|
|
|
gather_facts: false
|
2024-02-14 18:14:02 +08:00
|
|
|
become: true
|
2018-05-25 01:47:29 +08:00
|
|
|
|
|
|
|
tasks:
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Create a temp directory
|
|
|
|
ansible.builtin.tempfile:
|
2018-05-25 01:47:29 +08:00
|
|
|
state: directory
|
|
|
|
prefix: ceph_ansible
|
|
|
|
run_once: true
|
|
|
|
register: localtempfile
|
2019-05-13 22:12:42 +08:00
|
|
|
become: false
|
2020-10-02 19:43:47 +08:00
|
|
|
delegate_to: localhost
|
2018-05-25 01:47:29 +08:00
|
|
|
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Set_fact lookup_ceph_config - lookup keys, conf and logs
|
|
|
|
ansible.builtin.find:
|
2019-05-13 22:12:42 +08:00
|
|
|
paths:
|
|
|
|
- /etc/ceph
|
|
|
|
- /var/log/ceph
|
2018-05-25 01:47:29 +08:00
|
|
|
register: ceph_collect
|
|
|
|
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Collect ceph logs, config and keys on the machine running ansible
|
|
|
|
ansible.builtin.fetch:
|
2019-05-13 22:12:42 +08:00
|
|
|
src: "{{ item.path }}"
|
2018-05-25 01:47:29 +08:00
|
|
|
dest: "{{ localtempfile.path }}"
|
2024-02-14 18:14:02 +08:00
|
|
|
fail_on_missing: false
|
|
|
|
flat: false
|
2019-08-23 02:29:40 +08:00
|
|
|
with_items: "{{ ceph_collect.files }}"
|