diff --git a/ansible/roles/nova/tasks/bootstrap.yml b/ansible/roles/nova/tasks/bootstrap.yml
index 34a85d98f2..28172ff9f7 100644
--- a/ansible/roles/nova/tasks/bootstrap.yml
+++ b/ansible/roles/nova/tasks/bootstrap.yml
@@ -44,7 +44,9 @@
       database_password: "{{ nova_api_database_password }}"
   run_once: True
   delegate_to: "{{ groups['nova-api'][0] }}"
-  when: database.changed or not use_preconfigured_databases | bool
+  when:
+    - database.changed
+    - not use_preconfigured_databases | bool
 
 - include: bootstrap_service.yml
   when: database.changed or use_preconfigured_databases | bool