ceph-ansible/roles/ceph-osd/tasks/build_devices.yml

25 lines
811 B
YAML

---
- name: resolve dedicated device link(s)
command: readlink -f {{ item }}
changed_when: false
with_items: "{{ dedicated_devices }}"
register: dedicated_devices_prepare_canonicalize
when:
- osd_scenario == 'non-collocated'
- not osd_auto_discovery
- name: set_fact build dedicated_devices from resolved symlinks
set_fact:
dedicated_devices_tmp: "{{ dedicated_devices_tmp | default([]) + [ item.stdout ] }}"
with_items: "{{ dedicated_devices_prepare_canonicalize.results }}"
when:
- osd_scenario == 'non-collocated'
- not osd_auto_discovery
- name: set_fact build final dedicated_devices list
set_fact:
dedicated_devices: "{{ dedicated_devices_tmp | reject('search','/dev/disk') | list }}"
when:
- osd_scenario == 'non-collocated'
- not osd_auto_discovery