1c84f6a5ff
Configure the four paramters (public_network, cluster_network, ms_bind_ipv4 and ms_bind_ipv6) in cephadm_config_set.yaml tasks file instead of in ceph.conf.j2 template. If a user overrides the tripleo_cephadm_assimilate_conf file to provide their own initial Ceph configuration file without any network configuration, then we don't want to loose the network configuration that would have been set from the ceph.conf.j2 template. Thus, we'll ensure the correct network configuration can happen even if the ceph.conf.j2 template is not used. If the tripleo_cephadm_assimilate_conf file contains any of the four parameters, then those parameters will not be set via cephadm_config_set.yaml tasks. This allows users to still override the four parameters via the --config option. The cephadm_config_set.yaml tasks are always called by the apply_spec.yaml tasks before the spec is applied. Thus, we'll know the correct networks are set before any other daemons are added with the exception of the first bootstrapped mon/mgr daemons. The public_network for them is set implicitly via the --mon-ip option. Change-Id: If196dfcd0fd2cec3b7784394e86c4addbfbf039d
34 lines
1000 B
Django/Jinja
34 lines
1000 B
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 }}
|
|
|
|
{# 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 %}
|