]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
osd: add a default value for 'default' in crush_rules v6.0.0alpha1
authorGuillaume Abrioux <gabrioux@redhat.com>
Tue, 24 Mar 2020 08:56:45 +0000 (09:56 +0100)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Tue, 24 Mar 2020 12:41:43 +0000 (08:41 -0400)
Let's default to `False` for the `default` attribute in `crush_rules`
variable.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1797774
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
roles/ceph-osd/tasks/crush_rules.yml

index 9a01063afef9c841205f60de18ac5a02344dd57c..37ff7b7f0e39f2eaca1a6d420532b8bce611c6fb 100644 (file)
@@ -24,7 +24,7 @@
   with_items: "{{ hostvars[groups[mon_group_name][0]]['crush_rules'] | default(crush_rules) | unique }}"
   delegate_to: '{{ groups[mon_group_name][0] }}'
   run_once: true
-  when: item.default | bool
+  when: item.default | default(False) | bool
 
 # If multiple rules are set as default (should not be) then the last one is taken as actual default.
 # the with_items statement overrides each iteration with the new one.