From 03a2d8be877a7a37cfa93833dbd3e5baba923662 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Mon, 11 Jan 2021 14:57:57 +0100 Subject: [PATCH] validate: check ec_profiles variable This commit adds a check to validate the `ec_profiles` variable. Signed-off-by: Guillaume Abrioux --- roles/ceph-validate/tasks/main.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/roles/ceph-validate/tasks/main.yml b/roles/ceph-validate/tasks/main.yml index b6d33a690..2f4b2b65d 100644 --- a/roles/ceph-validate/tasks/main.yml +++ b/roles/ceph-validate/tasks/main.yml @@ -294,3 +294,13 @@ when: - rgwloadbalancer_group_name in group_names - (virtual_ips | length) > (groups[rgwloadbalancer_group_name] | length) + +- name: validate ec_profiles variable + fail: + msg: "ec_profiles is not defined correctly. " + with_items: "{{ ec_profiles }}" + when: + - ec_profiles is defined + - item.name is not defined or + ((item.k is not defined or + item.m is not defined) and (item.state | default('present') == 'present')) -- 2.47.3