mirror of https://github.com/ceph/ceph-ansible.git
ceph-facts: generate devices when osd_auto_discovery is true
This task used to live in ceph-osd, but we need it defined here to that ceph-config can use it when trying to determine the number of osds. Signed-off-by: Andrew Schoen <aschoen@redhat.com>pull/3564/head
parent
c5b082848f
commit
88eda479a9
|
@ -173,6 +173,19 @@
|
|||
- not osd_auto_discovery|default(False)
|
||||
- osd_scenario|default('dummy') != 'lvm'
|
||||
|
||||
- name: set_fact devices generate device list when osd_auto_discovery
|
||||
set_fact:
|
||||
devices: "{{ devices | default([]) + [ item.key | regex_replace('^', '/dev/') ] }}"
|
||||
with_dict: "{{ ansible_devices }}"
|
||||
when:
|
||||
- osd_auto_discovery|default(False)
|
||||
- ansible_devices is defined
|
||||
- item.value.removable == "0"
|
||||
- item.value.sectors != "0"
|
||||
- item.value.partitions|count == 0
|
||||
- item.value.holders|count == 0
|
||||
- "'dm-' not in item.key"
|
||||
|
||||
- name: set_fact ceph_uid for debian based system - non container
|
||||
set_fact:
|
||||
ceph_uid: 64045
|
||||
|
|
|
@ -1,17 +1,4 @@
|
|||
---
|
||||
- name: set_fact devices generate device list when osd_auto_discovery
|
||||
set_fact:
|
||||
devices: "{{ devices | default([]) + [ item.key | regex_replace('^', '/dev/') ] }}"
|
||||
with_dict: "{{ ansible_devices }}"
|
||||
when:
|
||||
- osd_auto_discovery
|
||||
- ansible_devices is defined
|
||||
- item.value.removable == "0"
|
||||
- item.value.sectors != "0"
|
||||
- item.value.partitions|count == 0
|
||||
- item.value.holders|count == 0
|
||||
- "'dm-' not in item.key"
|
||||
|
||||
- name: resolve dedicated device link(s)
|
||||
command: readlink -f {{ item }}
|
||||
changed_when: false
|
||||
|
|
Loading…
Reference in New Issue