How to use "when" with multiple "item.x"?

Guys,

Currently, I have an Ansible automation to deploy OpenStack, it works great but, starting from Mitaka, Nova requires two SQL databases (nova and nova_api), and not just only one anymore.

So, for Liberty, I have something like this:

group_vars/all:

(https://github.com/tmartinx/svauto/blob/dev/ansible/group_vars/all)