]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
validate: check ec_profiles variable guits-create-ec-profile 6124/head
authorGuillaume Abrioux <gabrioux@redhat.com>
Mon, 11 Jan 2021 13:57:57 +0000 (14:57 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 3 Feb 2021 07:32:39 +0000 (08:32 +0100)
This commit adds a check to validate the `ec_profiles` variable.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
roles/ceph-validate/tasks/main.yml

index b6d33a690ab2808756e0d93c166e24182f1c627c..2f4b2b65dfd3d979a6cc205ab5bbe8826e58a5fe 100644 (file)
   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'))