---
- include: ceph.yml
  when:
    - (enable_ceph | bool) and (cinder_backend_ceph | bool)
    - inventory_hostname in groups['ceph-mon'] or
        inventory_hostname in groups['cinder-api'] or
        inventory_hostname in groups['cinder-volume'] or
        inventory_hostname in groups['cinder-scheduler'] or
        inventory_hostname in groups['cinder-backup']

- include: external_ceph.yml
  when:
    - (enable_ceph | bool == False) and (cinder_backend_ceph | bool)
    - inventory_hostname in groups['cinder-volume'] or
      inventory_hostname in groups['cinder-backup']

- include: register.yml
  when: inventory_hostname in groups['cinder-api']

- include: config.yml
  when: inventory_hostname in groups['cinder-api'] or
        inventory_hostname in groups['cinder-volume'] or
        inventory_hostname in groups['cinder-scheduler'] or
        inventory_hostname in groups['cinder-backup']

- include: clone.yml
  when: cinder_dev_mode | bool

- include: bootstrap.yml
  when: inventory_hostname in groups['cinder-api']

- name: Flush handlers
  meta: flush_handlers

- include: check.yml
  when: inventory_hostname in groups['cinder-api'] or
        inventory_hostname in groups['cinder-volume'] or
        inventory_hostname in groups['cinder-scheduler'] or
        inventory_hostname in groups['cinder-backup']
