]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph-facts: generate devices when osd_auto_discovery is true
authorAndrew Schoen <aschoen@redhat.com>
Thu, 10 Jan 2019 17:26:19 +0000 (11:26 -0600)
committerGuillaume Abrioux <gabrioux@redhat.com>
Mon, 9 Dec 2019 08:32:55 +0000 (09:32 +0100)
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>
(cherry picked from commit 88eda479a9d6df6224a24f56dbcbdb204daab150)

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

index 331235463df6a98a0362e684bf250b29d8f40aa0..4798b0a0ef61da971cd23e3efac913b007c14a6a 100644 (file)
     - inventory_hostname in groups.get(osd_group_name, [])
     - not osd_auto_discovery|default(False)
 
+- 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
index b578c320f6b69074aacb2778b52b7775741d3c45..350e085d30d1202043ad35c483c677ad9cee992a 100644 (file)
@@ -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