#jinja2: trim_blocks: "true", lstrip_blocks: "true" # {{ ansible_managed }} # Generated by cifmw_cephadm for initial bootstrap of first Ceph Mon {# MACRO AREA #} {% macro render_map(root) -%} {% for key, value in root.items() %} {{ key}} = {{ value }} {% endfor %} {% endmacro %} [global] fsid = {{ cifmw_cephadm_fsid }} mon host = {{ cifmw_cephadm_first_mon_ip }} {# Build CephConfigOverrides #} {% for key, value in (cifmw_ceph_rgw_config | default({})).items() %} {% if not (['global', 'mon', 'mgr', 'osd', 'mds', 'client']) | intersect([key]) %} {{ key }} = {{ value }} {% elif (['global']) | intersect([key]) %} {# Merge global defined values into this section #} {{ render_map(value) }} {% endif %} {% endfor %} {# Build the remaining sections #} {% for key, value in (cifmw_ceph_rgw_config | default({})).items() %} {% if (['mon', 'mgr', 'osd', 'mds', 'client']) | intersect([key]) %} [{{ key }}] {# Render the current section #} {{ render_map(value) }} {% endif %} {% endfor %}