---
- include: config.yml

- include: bootstrap_mons.yml
  when: inventory_hostname in groups['ceph-mon']

- include: distribute_keyrings.yml

- include: start_mons.yml
  when: inventory_hostname in groups['ceph-mon']

- include: start_mgrs.yml
  when: inventory_hostname in groups['ceph-mgr']

- include: start_ceph_dashboard.yml
  when:
    - enable_ceph_dashboard | bool
    - inventory_hostname in groups['ceph-mon']

- include: start_nfss.yml
  when:
    - enable_ceph_nfs | bool
    - inventory_hostname in groups['ceph-nfs']

- name: configuring client.admin caps
  kolla_ceph_keyring:
    name: client.admin
    caps: "{{ ceph_client_admin_keyring_caps }}"
  run_once: True
  delegate_to: "{{ groups['ceph-mon'][0] }}"

- include: bootstrap_osds.yml
  when: inventory_hostname in groups['ceph-osd']

- include: start_osds.yml
  when: inventory_hostname in groups['ceph-osd']

- include: start_rgws.yml
  when:
    - enable_ceph_rgw | bool
    - inventory_hostname in groups['ceph-rgw']

- include: start_rgw_keystone.yml
  when:
    - enable_ceph_rgw_keystone | bool
    - inventory_hostname in groups['ceph-rgw']

- include: start_mdss.yml
  when:
    - enable_ceph_mds | bool
    - inventory_hostname in groups['ceph-mds']
