2015-02-15 09:21:27 +08:00
|
|
|
#jinja2: trim_blocks: "true", lstrip_blocks: "true"
|
2014-10-10 21:41:31 +08:00
|
|
|
# {{ ansible_managed }}
|
2014-03-04 02:08:51 +08:00
|
|
|
|
|
|
|
[global]
|
2024-02-14 22:29:03 +08:00
|
|
|
{% if not cephx | bool %}
|
|
|
|
auth cluster required = none
|
|
|
|
auth service required = none
|
|
|
|
auth client required = none
|
|
|
|
{% endif %}
|
2016-05-27 22:37:07 +08:00
|
|
|
{# NOTE (leseb): the blank lines in-between are needed otherwise we won't get any line break #}
|
2017-08-04 22:57:46 +08:00
|
|
|
|
|
|
|
{% set nb_mon = groups.get(mon_group_name, []) | length | int %}
|
2014-11-10 21:50:19 +08:00
|
|
|
|
2016-05-27 22:37:07 +08:00
|
|
|
fsid = {{ fsid }}
|
2017-08-04 22:57:46 +08:00
|
|
|
mon host = {% if nb_mon > 0 %}
|
2024-02-16 21:20:22 +08:00
|
|
|
{% for name, addr in _monitor_addresses.items() -%}
|
2020-09-25 22:20:35 +08:00
|
|
|
{% if mon_host_v1.enabled | bool %}
|
2024-02-16 21:20:22 +08:00
|
|
|
{% set _v1 = ',v1:' + addr + mon_host_v1.suffix %}
|
2019-04-16 16:31:44 +08:00
|
|
|
{% endif %}
|
2024-02-16 21:20:22 +08:00
|
|
|
[{{ "v2:" + addr + mon_host_v2.suffix }}{{ _v1 | default('') }}]
|
2018-10-03 22:09:33 +08:00
|
|
|
{%- if not loop.last -%},{%- endif %}
|
|
|
|
{%- endfor %}
|
2019-05-20 21:58:10 +08:00
|
|
|
{% elif nb_mon == 0 %}
|
2018-10-03 22:09:33 +08:00
|
|
|
{{ external_cluster_mon_ips }}
|
2016-05-27 22:37:07 +08:00
|
|
|
{% endif %}
|
|
|
|
|
2017-08-04 22:57:46 +08:00
|
|
|
{% if inventory_hostname in groups.get(client_group_name, []) %}
|
2016-05-27 22:37:07 +08:00
|
|
|
[client.libvirt]
|
|
|
|
admin socket = {{ rbd_client_admin_socket_path }}/$cluster-$type.$id.$pid.$cctid.asok # must be writable by QEMU and allowed by SELinux or AppArmor
|
|
|
|
log file = {{ rbd_client_log_file }} # must be writable by QEMU and allowed by SELinux or AppArmor
|
2017-08-04 22:57:46 +08:00
|
|
|
{% endif %}
|