From: Guillaume Abrioux Date: Mon, 11 Jan 2021 13:57:57 +0000 (+0100) Subject: validate: check ec_profiles variable X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F6124%2Fhead;p=ceph-ansible.git validate: check ec_profiles variable This commit adds a check to validate the `ec_profiles` variable. Signed-off-by: Guillaume Abrioux --- 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'))