From f288364c5c268e61d49165704900e8e01ca643c8 Mon Sep 17 00:00:00 2001 From: pinotelio Date: Mon, 4 Apr 2022 14:18:14 +0430 Subject: [PATCH] ceph-facts: fix ansible templating error for auto osd discovery This commit fixes templating error that occurs when using auto osd discovery. Getting the len before converting the result to a list causes "object of type generator has no len()" error. Signed-off-by: pinotelio --- roles/ceph-facts/tasks/devices.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/ceph-facts/tasks/devices.yml b/roles/ceph-facts/tasks/devices.yml index 6c4af65ec..4393f7cf3 100644 --- a/roles/ceph-facts/tasks/devices.yml +++ b/roles/ceph-facts/tasks/devices.yml @@ -87,5 +87,5 @@ - item.value.sectors != "0" - item.value.partitions|count == 0 - item.value.holders|count == 0 - - ansible_facts['mounts'] | selectattr('device', 'equalto', device) | length == 0 + - ansible_facts['mounts'] | selectattr('device', 'equalto', device) | list | length == 0 - item.key is not match osd_auto_discovery_exclude