osd: add a default value for 'default' in crush_rules

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 1b0b7af119)
pull/5408/head
Guillaume Abrioux 2020-03-24 09:56:45 +01:00 committed by Dimitri Savineau
parent a97e24fee9
commit 86d5979269
1 changed files with 1 additions and 1 deletions

View 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.