40 lines
1.2 KiB
Django/Jinja
40 lines
1.2 KiB
Django/Jinja
#jinja2: trim_blocks: "true", lstrip_blocks: "true"
|
|
# {{ ansible_managed }}
|
|
# Generated by tripleo_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 = {{ tripleo_cephadm_fsid }}
|
|
mon host = {{ tripleo_cephadm_first_mon_ip }}
|
|
{% if public_network is defined %}
|
|
public network = {{ public_network | regex_replace(' ', '') }}
|
|
{% endif %}
|
|
{% if cluster_network is defined %}
|
|
cluster network = {{ cluster_network | regex_replace(' ', '') }}
|
|
{% endif %}
|
|
|
|
{# Build CephConfigOverrides #}
|
|
{% for key, value in (ceph_conf_overrides | 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 (ceph_conf_overrides | default({})).items() %}
|
|
{% if (['mon', 'mgr', 'osd', 'mds', 'client']) | intersect([key]) %}
|
|
[{{ key }}]
|
|
{# Render the current section #}
|
|
{{ render_map(value) }}
|
|
{% endif %}
|
|
{% endfor %}
|