[global]
fsid = {{ ceph_cluster_fsid }}
mon initial members = {% for host in groups['ceph-mon'] %}{{ hostvars[host]['storage_hostname'] }}{% if not loop.last %}, {% endif %}{% endfor %}

mon host = {% for host in groups['ceph-mon'] %}{{ hostvars[host]['storage_hostname'] }}{% if not loop.last %}, {% endif %}{% endfor %}

mon addr = {% for host in groups['ceph-mon'] %}{{ hostvars[host]['ansible_' + hostvars[host]['storage_interface']]['ipv4']['address'] }}:6789{% if not loop.last %}, {% endif %}{% endfor %}

auth cluster required = cephx
auth service required = cephx
auth client required = cephx

{% if service_name is defined and service_name == 'ceph-rgw' %}
[client.radosgw.gateway]
host = {{ hostvars[inventory_hostname]['ansible_' + storage_interface]['ipv4']['address'] }}
keyring = /etc/ceph/ceph.client.radosgw.keyring
log file = /var/log/radosgw/client.radosgw.gateway.log
rgw frontends = civetweb port={{ hostvars[inventory_hostname]['ansible_' + storage_interface]['ipv4']['address'] }}:{{ rgw_port }}
{% endif %}