2018-05-25 01:47:29 +08:00
|
|
|
- hosts:
|
|
|
|
- mons
|
|
|
|
- osds
|
|
|
|
- mdss
|
|
|
|
- rgws
|
|
|
|
- nfss
|
|
|
|
- rbdmirrors
|
|
|
|
- clients
|
|
|
|
- mgrs
|
|
|
|
- iscsi-gws
|
|
|
|
- iscsigws
|
|
|
|
|
|
|
|
gather_facts: false
|
|
|
|
become: yes
|
|
|
|
|
|
|
|
tasks:
|
|
|
|
- name: create a temp directory
|
2020-10-02 19:43:47 +08:00
|
|
|
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
|
|
|
|
|
|
|
- name: set_fact lookup_ceph_config - lookup keys, conf and logs
|
2019-05-13 22:12:42 +08:00
|
|
|
find:
|
|
|
|
paths:
|
|
|
|
- /etc/ceph
|
|
|
|
- /var/log/ceph
|
2018-05-25 01:47:29 +08:00
|
|
|
register: ceph_collect
|
|
|
|
|
|
|
|
- name: collect ceph logs, config and keys in "{{ localtempfile.path }}" on the machine running ansible
|
|
|
|
fetch:
|
2019-05-13 22:12:42 +08:00
|
|
|
src: "{{ item.path }}"
|
2018-05-25 01:47:29 +08:00
|
|
|
dest: "{{ localtempfile.path }}"
|
|
|
|
fail_on_missing: no
|
|
|
|
flat: no
|
2019-08-23 02:29:40 +08:00
|
|
|
with_items: "{{ ceph_collect.files }}"
|