]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
osd: add a default value for 'default' in crush_rules
authorGuillaume Abrioux <gabrioux@redhat.com>
Tue, 24 Mar 2020 08:56:45 +0000 (09:56 +0100)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Wed, 3 Jun 2020 17:20:40 +0000 (13:20 -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>
(cherry picked from commit 1b0b7af119929eca86d8f4684e4dbd228d6509f4)

roles/ceph-osd/tasks/crush_rules.yml

index 8fa783d0e0a9707a0729640dbbfccf8ab482776e..c027ca4223ef4b3918caa2acc3b41534a9e31371 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.