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]
|
2016-04-07 16:46:42 +08:00
|
|
|
|
{% if not cephx %}
|
2015-12-16 23:11:14 +08:00
|
|
|
|
auth cluster required = none
|
|
|
|
|
auth service required = none
|
|
|
|
|
auth client required = none
|
|
|
|
|
auth supported = none
|
|
|
|
|
{% endif %}
|
2017-01-24 23:06:10 +08:00
|
|
|
|
{% if ip_version == 'ipv6' %}
|
2017-02-08 02:34:29 +08:00
|
|
|
|
ms bind ipv6 = true
|
2017-01-24 23:06:10 +08:00
|
|
|
|
{% endif %}
|
2017-04-13 01:57:33 +08:00
|
|
|
|
{% if not containerized_deployment_with_kv and not containerized_deployment %}
|
2016-03-29 06:34:08 +08:00
|
|
|
|
fsid = {{ fsid }}
|
|
|
|
|
{% endif %}
|
2016-12-08 20:25:15 +08:00
|
|
|
|
{% if common_single_host_mode is defined and common_single_host_mode %}
|
2015-12-16 23:11:14 +08:00
|
|
|
|
osd crush chooseleaf type = 0
|
2014-05-01 07:24:20 +08:00
|
|
|
|
{% 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 %}
|
|
|
|
|
{% set nb_client = groups.get(client_group_name, []) | length | int %}
|
|
|
|
|
{% set nb_osd = groups.get(osd_group_name, []) | length | int %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{% if nb_mon > 0 and inventory_hostname in groups.get(mon_group_name, []) %}
|
2016-11-08 23:58:35 +08:00
|
|
|
|
mon initial members = {% for host in groups[mon_group_name] %}
|
|
|
|
|
{% if hostvars[host]['ansible_fqdn'] is defined and mon_use_fqdn -%}
|
|
|
|
|
{{ hostvars[host]['ansible_fqdn'] }}
|
|
|
|
|
{%- elif hostvars[host]['ansible_hostname'] is defined -%}
|
|
|
|
|
{{ hostvars[host]['ansible_hostname'] }}
|
|
|
|
|
{%- endif %}
|
|
|
|
|
{%- if not loop.last %},{% endif %}
|
|
|
|
|
{% endfor %}
|
2019-03-08 06:14:12 +08:00
|
|
|
|
|
|
|
|
|
osd pool default crush rule = {{ osd_pool_default_crush_rule | default(ceph_osd_pool_default_crush_rule) }}
|
2016-08-13 08:45:55 +08:00
|
|
|
|
{% endif %}
|
2014-11-10 21:50:19 +08:00
|
|
|
|
|
2017-06-07 19:26:04 +08:00
|
|
|
|
{% if not containerized_deployment and not containerized_deployment_with_kv -%}
|
2017-08-04 22:57:46 +08:00
|
|
|
|
mon host = {% if nb_mon > 0 %}
|
|
|
|
|
{% for host in groups[mon_group_name] -%}
|
2018-10-02 21:55:47 +08:00
|
|
|
|
{% if hostvars[host]['monitor_address_block'] is defined and hostvars[host]['monitor_address_block'] != 'subnet' %}
|
2017-06-07 19:26:04 +08:00
|
|
|
|
{% if ip_version == 'ipv4' -%}
|
2018-10-02 21:55:47 +08:00
|
|
|
|
{{ hostvars[host]['ansible_all_' + ip_version + '_addresses'] | ipaddr(hostvars[host]['monitor_address_block']) | first }}
|
2017-06-07 19:26:04 +08:00
|
|
|
|
{%- elif ip_version == 'ipv6' -%}
|
2018-10-02 21:55:47 +08:00
|
|
|
|
[{{ hostvars[host]['ansible_all_' + ip_version + '_addresses'] | ipaddr(hostvars[host]['monitor_address_block']) | first }}]
|
2017-06-07 19:26:04 +08:00
|
|
|
|
{%- endif %}
|
|
|
|
|
{% elif hostvars[host]['monitor_address'] is defined and hostvars[host]['monitor_address'] != '0.0.0.0' -%}
|
|
|
|
|
{% if ip_version == 'ipv4' -%}
|
|
|
|
|
{{ hostvars[host]['monitor_address'] }}
|
|
|
|
|
{%- elif ip_version == 'ipv6' -%}
|
|
|
|
|
[{{ hostvars[host]['monitor_address'] }}]
|
|
|
|
|
{%- endif %}
|
2017-11-02 21:53:46 +08:00
|
|
|
|
{%- elif hostvars[host]['monitor_interface'] is defined -%}
|
2017-12-11 23:56:56 +08:00
|
|
|
|
{% set interface = 'ansible_' + (hostvars[host]['monitor_interface'] | replace('-', '_')) %}
|
2017-11-02 21:53:46 +08:00
|
|
|
|
{% if ip_version == 'ipv4' -%}
|
|
|
|
|
{{ hostvars[host][interface][ip_version]['address'] }}
|
|
|
|
|
{%- elif ip_version == 'ipv6' -%}
|
|
|
|
|
[{{ hostvars[host][interface][ip_version][0]['address'] }}]
|
|
|
|
|
{%- endif %}
|
2017-06-07 19:26:04 +08:00
|
|
|
|
{%- else -%}
|
2017-12-11 23:56:56 +08:00
|
|
|
|
{% set interface = 'ansible_' + (monitor_interface | replace('-', '_')) %}
|
2017-06-07 19:26:04 +08:00
|
|
|
|
{% if ip_version == 'ipv4' -%}
|
2017-11-02 21:53:46 +08:00
|
|
|
|
{{ hostvars[host][interface][ip_version]['address'] }}
|
2017-06-07 19:26:04 +08:00
|
|
|
|
{%- elif ip_version == 'ipv6' -%}
|
2017-11-02 21:53:46 +08:00
|
|
|
|
[{{ hostvars[host][interface][ip_version][0]['address'] }}]
|
2017-06-07 19:26:04 +08:00
|
|
|
|
{%- endif %}
|
|
|
|
|
{%- endif %}
|
|
|
|
|
{% if not loop.last -%},{%- endif %}
|
|
|
|
|
{%- endfor %}
|
2017-08-04 22:57:46 +08:00
|
|
|
|
{% elif nb_mon == 0 and inventory_hostname in groups.get(client_group_name, []) %}
|
|
|
|
|
{{ external_cluster_mon_ips }}
|
|
|
|
|
{% endif %}
|
2017-06-07 19:26:04 +08:00
|
|
|
|
{%- endif %}
|
|
|
|
|
|
2017-04-13 01:57:33 +08:00
|
|
|
|
{% if containerized_deployment %}
|
2016-05-27 22:37:07 +08:00
|
|
|
|
fsid = {{ fsid }}
|
2018-01-09 21:34:09 +08:00
|
|
|
|
log file = /dev/null
|
2018-07-05 20:10:33 +08:00
|
|
|
|
mon cluster log file = /dev/null
|
2017-08-04 22:57:46 +08:00
|
|
|
|
mon host = {% if nb_mon > 0 %}
|
|
|
|
|
{% for host in groups[mon_group_name] -%}
|
2018-10-02 21:55:47 +08:00
|
|
|
|
{% if hostvars[host]['monitor_address_block'] is defined and hostvars[host]['monitor_address_block'] != 'subnet' %}
|
2017-06-07 19:26:04 +08:00
|
|
|
|
{% if ip_version == 'ipv4' -%}
|
2018-10-02 21:55:47 +08:00
|
|
|
|
{{ hostvars[host]['ansible_all_' + ip_version + '_addresses'] | ipaddr(hostvars[host]['monitor_address_block']) | first }}
|
2017-06-07 19:26:04 +08:00
|
|
|
|
{%- elif ip_version == 'ipv6' -%}
|
2018-10-02 21:55:47 +08:00
|
|
|
|
[{{ hostvars[host]['ansible_all_' + ip_version + '_addresses'] | ipaddr(hostvars[host]['monitor_address_block']) | first }}]
|
2017-06-07 19:26:04 +08:00
|
|
|
|
{%- endif %}
|
|
|
|
|
{% elif hostvars[host]['monitor_address'] is defined and hostvars[host]['monitor_address'] != '0.0.0.0' -%}
|
|
|
|
|
{% if ip_version == 'ipv4' -%}
|
|
|
|
|
{{ hostvars[host]['monitor_address'] }}
|
|
|
|
|
{%- elif ip_version == 'ipv6' -%}
|
|
|
|
|
[{{ hostvars[host]['monitor_address'] }}]
|
|
|
|
|
{%- endif %}
|
2017-11-02 21:53:46 +08:00
|
|
|
|
{%- elif hostvars[host]['monitor_interface'] is defined -%}
|
2017-12-11 23:56:56 +08:00
|
|
|
|
{% set interface = 'ansible_' + (hostvars[host]['monitor_interface'] | replace('-', '_')) %}
|
2017-06-07 19:26:04 +08:00
|
|
|
|
{% if ip_version == 'ipv4' -%}
|
|
|
|
|
{{ hostvars[host][interface][ip_version]['address'] }}
|
|
|
|
|
{%- elif ip_version == 'ipv6' -%}
|
|
|
|
|
[{{ hostvars[host][interface][ip_version][0]['address'] }}]
|
|
|
|
|
{%- endif %}
|
2017-11-02 21:53:46 +08:00
|
|
|
|
{%- else -%}
|
2017-12-11 23:56:56 +08:00
|
|
|
|
{% set interface = 'ansible_' + (monitor_interface | replace('-', '_')) %}
|
2017-11-02 21:53:46 +08:00
|
|
|
|
{% if ip_version == 'ipv4' -%}
|
2017-11-09 07:03:00 +08:00
|
|
|
|
{{ hostvars[host][interface][ip_version]['address'] }}
|
2017-11-02 21:53:46 +08:00
|
|
|
|
{%- elif ip_version == 'ipv6' -%}
|
2017-11-09 07:03:00 +08:00
|
|
|
|
[{{ hostvars[host][interface][ip_version][0]['address'] }}]
|
2017-11-02 21:53:46 +08:00
|
|
|
|
{%- endif %}
|
2017-06-07 19:26:04 +08:00
|
|
|
|
{%- endif %}
|
|
|
|
|
{% if not loop.last -%},{%- endif %}
|
|
|
|
|
{%- endfor %}
|
2017-08-04 22:57:46 +08:00
|
|
|
|
{% elif nb_mon == 0 and inventory_hostname in groups.get(client_group_name, []) %}
|
|
|
|
|
{{ external_cluster_mon_ips }}
|
|
|
|
|
{% endif %}
|
2016-05-27 22:37:07 +08:00
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
{% if public_network is defined %}
|
2018-01-30 21:39:58 +08:00
|
|
|
|
public network = {{ public_network | regex_replace(' ', '') }}
|
2016-05-27 22:37:07 +08:00
|
|
|
|
{% endif %}
|
|
|
|
|
{% if cluster_network is defined %}
|
2018-01-30 21:39:58 +08:00
|
|
|
|
cluster network = {{ cluster_network | regex_replace(' ', '') }}
|
2016-05-27 22:37:07 +08:00
|
|
|
|
{% endif %}
|
2017-05-11 01:00:41 +08:00
|
|
|
|
{% if rgw_override_bucket_index_max_shards is defined %}
|
|
|
|
|
rgw override bucket index max shards = {{ rgw_override_bucket_index_max_shards }}
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% if rgw_bucket_default_quota_max_objects is defined %}
|
|
|
|
|
rgw bucket default quota max objects = {{ rgw_bucket_default_quota_max_objects }}
|
|
|
|
|
{% endif %}
|
2016-05-27 22:37:07 +08:00
|
|
|
|
|
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 %}
|
2014-03-04 02:08:51 +08:00
|
|
|
|
|
2017-08-04 22:57:46 +08:00
|
|
|
|
{% if inventory_hostname in groups.get(osd_group_name, []) %}
|
2017-09-21 00:14:23 +08:00
|
|
|
|
{% if osd_objectstore == 'filestore' %}
|
2014-03-04 02:08:51 +08:00
|
|
|
|
[osd]
|
2015-12-16 23:11:14 +08:00
|
|
|
|
osd mkfs type = {{ osd_mkfs_type }}
|
|
|
|
|
osd mkfs options xfs = {{ osd_mkfs_options_xfs }}
|
|
|
|
|
osd mount options xfs = {{ osd_mount_options_xfs }}
|
|
|
|
|
osd journal size = {{ journal_size }}
|
2016-02-20 05:06:12 +08:00
|
|
|
|
{% if filestore_xattr_use_omap != None %}
|
|
|
|
|
filestore xattr use omap = {{ filestore_xattr_use_omap }}
|
|
|
|
|
{% elif osd_mkfs_type == "ext4" %}
|
|
|
|
|
filestore xattr use omap = true
|
|
|
|
|
{# else, default is false #}
|
|
|
|
|
{% endif %}
|
2017-08-04 22:57:46 +08:00
|
|
|
|
{% endif %}
|
2018-09-11 01:23:20 +08:00
|
|
|
|
{% if osd_objectstore == 'bluestore' %}
|
|
|
|
|
{% set _num_osds = num_osds | default(0) | int %}
|
|
|
|
|
[osd]
|
|
|
|
|
{% if is_hci and _num_osds > 0 %}
|
2018-11-29 17:16:52 +08:00
|
|
|
|
{# hci_safety_factor is the safety factor for HCI deployments #}
|
|
|
|
|
{% if ansible_memtotal_mb * 1048576 * hci_safety_factor / _num_osds > osd_memory_target %}
|
2018-11-21 21:38:25 +08:00
|
|
|
|
{% set _osd_memory_target = (ansible_memtotal_mb * 1048576 * hci_safety_factor / _num_osds) | int %}
|
2018-09-11 01:23:20 +08:00
|
|
|
|
{% endif %}
|
|
|
|
|
{% elif _num_osds > 0 %}
|
2018-11-29 17:16:52 +08:00
|
|
|
|
{# non_hci_safety_factor is the safety factor for dedicated nodes #}
|
|
|
|
|
{% if ansible_memtotal_mb * 1048576 * non_hci_safety_factor / _num_osds > osd_memory_target %}
|
2018-11-21 21:38:25 +08:00
|
|
|
|
{% set _osd_memory_target = (ansible_memtotal_mb * 1048576 * non_hci_safety_factor / _num_osds) | int %}
|
2018-09-11 01:23:20 +08:00
|
|
|
|
{% endif %}
|
|
|
|
|
{% endif %}
|
|
|
|
|
osd memory target = {{ _osd_memory_target | default(osd_memory_target) }}
|
|
|
|
|
{% endif %}
|
2017-09-21 00:14:23 +08:00
|
|
|
|
{% endif %}
|
2014-08-30 08:58:27 +08:00
|
|
|
|
|
2017-10-08 21:16:40 +08:00
|
|
|
|
{% if inventory_hostname in groups.get(rgw_group_name, []) %}
|
2015-06-11 08:42:41 +08:00
|
|
|
|
{% for host in groups[rgw_group_name] %}
|
2018-09-19 00:10:57 +08:00
|
|
|
|
{% set _rgw_hostname = hostvars[host]['rgw_hostname'] | default(hostvars[host]['ansible_hostname']) %}
|
2018-08-09 17:03:32 +08:00
|
|
|
|
{# {{ hostvars[host]['rgw_hostname'] }} for backward compatibility, fqdn issues. See bz1580408 #}
|
2018-09-19 00:10:57 +08:00
|
|
|
|
[client.rgw.{{ _rgw_hostname }}]
|
|
|
|
|
host = {{ _rgw_hostname }}
|
|
|
|
|
keyring = /var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ _rgw_hostname }}/keyring
|
2016-03-29 21:37:31 +08:00
|
|
|
|
log file = /var/log/ceph/{{ cluster }}-rgw-{{ hostvars[host]['ansible_hostname'] }}.log
|
2017-10-19 00:03:30 +08:00
|
|
|
|
{% if hostvars[host]['radosgw_address_block'] is defined and hostvars[host]['radosgw_address_block'] != 'subnet' %}
|
2017-10-12 00:29:34 +08:00
|
|
|
|
{% if ip_version == 'ipv4' %}
|
2018-07-27 23:46:38 +08:00
|
|
|
|
rgw frontends = {{ radosgw_frontend_type }} {{ 'port' if radosgw_frontend_type == 'civetweb' else 'endpoint' }}={{ hostvars[host]['ansible_all_' + ip_version + '_addresses'] | ipaddr(radosgw_address_block) | first }}:{{ radosgw_frontend_port }} {{ radosgw_frontend_options }}
|
2017-10-12 00:29:34 +08:00
|
|
|
|
{% elif ip_version == 'ipv6' %}
|
2018-07-27 23:46:38 +08:00
|
|
|
|
rgw frontends = {{ radosgw_frontend_type }} {{ 'port' if radosgw_frontend_type == 'civetweb' else 'endpoint' }}=[{{ hostvars[host]['ansible_all_' + ip_version + '_addresses'] | ipaddr(radosgw_address_block) | first }}]:{{ radosgw_frontend_port }} {{ radosgw_frontend_options }}
|
2017-10-12 00:29:34 +08:00
|
|
|
|
{% endif %}
|
2017-10-19 00:03:30 +08:00
|
|
|
|
{% elif radosgw_address_block is defined and radosgw_address_block != 'subnet' -%}
|
|
|
|
|
{% if ip_version == 'ipv4' %}
|
2018-07-27 23:46:38 +08:00
|
|
|
|
rgw frontends = {{ radosgw_frontend_type }} {{ 'port' if radosgw_frontend_type == 'civetweb' else 'endpoint' }}={{ radosgw_address_block | ipaddr(radosgw_address_block) | first }}:{{ radosgw_frontend_port }} {{ radosgw_frontend_options }}
|
2017-10-19 00:03:30 +08:00
|
|
|
|
{% elif ip_version == 'ipv6' %}
|
2018-07-27 23:46:38 +08:00
|
|
|
|
rgw frontends = {{ radosgw_frontend_type }} {{ 'port' if radosgw_frontend_type == 'civetweb' else 'endpoint' }}=[{{ radosgw_address_block | ipaddr(radosgw_address_block) | first }}]:{{ radosgw_frontend_port }} {{ radosgw_frontend_options }}
|
2017-10-19 00:03:30 +08:00
|
|
|
|
{% endif %}
|
2018-12-01 07:46:42 +08:00
|
|
|
|
{% elif hostvars[host]['radosgw_address'] is defined and hostvars[host]['radosgw_address'] != '0.0.0.0' -%}
|
2017-10-12 00:29:34 +08:00
|
|
|
|
{% if ip_version == 'ipv4' %}
|
2018-07-27 23:46:38 +08:00
|
|
|
|
rgw frontends = {{ radosgw_frontend_type }} {{ 'port' if radosgw_frontend_type == 'civetweb' else 'endpoint' }}={{ hostvars[host]['radosgw_address'] }}:{{ radosgw_frontend_port }} {{ radosgw_frontend_options }}
|
2017-10-12 00:29:34 +08:00
|
|
|
|
{% elif ip_version == 'ipv6' %}
|
2018-07-27 23:46:38 +08:00
|
|
|
|
rgw frontends = {{ radosgw_frontend_type }} {{ 'port' if radosgw_frontend_type == 'civetweb' else 'endpoint' }}=[{{ hostvars[host]['radosgw_address'] }}]:{{ radosgw_frontend_port }} {{ radosgw_frontend_options }}
|
2017-10-12 00:29:34 +08:00
|
|
|
|
{% endif %}
|
2018-12-01 07:46:42 +08:00
|
|
|
|
{% elif radosgw_address is defined and radosgw_address != '0.0.0.0' -%}
|
2017-10-19 00:03:30 +08:00
|
|
|
|
{% if ip_version == 'ipv4' %}
|
2018-07-27 23:46:38 +08:00
|
|
|
|
rgw frontends = {{ radosgw_frontend_type }} {{ 'port' if radosgw_frontend_type == 'civetweb' else 'endpoint' }}={{ radosgw_address }}:{{ radosgw_frontend_port }} {{ radosgw_frontend_options }}
|
2017-10-19 00:03:30 +08:00
|
|
|
|
{% elif ip_version == 'ipv6' %}
|
2018-07-27 23:46:38 +08:00
|
|
|
|
rgw frontends = {{ radosgw_frontend_type }} {{ 'port' if radosgw_frontend_type == 'civetweb' else 'endpoint' }}=[{{ radosgw_address }}]:{{ radosgw_frontend_port }} {{ radosgw_frontend_options }}
|
2017-10-19 00:03:30 +08:00
|
|
|
|
{% endif %}
|
|
|
|
|
{% elif hostvars[host]['radosgw_interface'] is defined -%}
|
2017-12-11 23:56:56 +08:00
|
|
|
|
{% set interface='ansible_' + (hostvars[host]['radosgw_interface'] | replace('-', '_')) %}
|
2017-10-12 00:29:34 +08:00
|
|
|
|
{% if ip_version == 'ipv4' %}
|
2018-07-27 23:46:38 +08:00
|
|
|
|
rgw frontends = {{ radosgw_frontend_type }} {{ 'port' if radosgw_frontend_type == 'civetweb' else 'endpoint' }}={{ hostvars[host][interface][ip_version]['address'] }}:{{ radosgw_frontend_port }} {{ radosgw_frontend_options }}
|
2017-10-12 00:29:34 +08:00
|
|
|
|
{% elif ip_version == 'ipv6' %}
|
2018-07-27 23:46:38 +08:00
|
|
|
|
rgw frontends = {{ radosgw_frontend_type }} {{ 'port' if radosgw_frontend_type == 'civetweb' else 'endpoint' }}=[{{ hostvars[host][interface][ip_version][0]['address'] }}]:{{ radosgw_frontend_port }} {{ radosgw_frontend_options }}
|
2017-10-12 00:29:34 +08:00
|
|
|
|
{% endif %}
|
2017-10-19 00:03:30 +08:00
|
|
|
|
{% else %}
|
2017-12-11 23:56:56 +08:00
|
|
|
|
{% set interface='ansible_' + (radosgw_interface | replace('-', '_')) %}
|
2017-10-19 00:03:30 +08:00
|
|
|
|
{% if ip_version == 'ipv4' %}
|
2018-07-27 23:46:38 +08:00
|
|
|
|
rgw frontends = {{ radosgw_frontend_type }} {{ 'port' if radosgw_frontend_type == 'civetweb' else 'endpoint' }}={{ hostvars[host][interface][ip_version]['address'] }}:{{ radosgw_frontend_port }} {{ radosgw_frontend_options }}
|
2017-10-19 00:03:30 +08:00
|
|
|
|
{% elif ip_version == 'ipv6' %}
|
2018-07-27 23:46:38 +08:00
|
|
|
|
rgw frontends = {{ radosgw_frontend_type }} {{ 'port' if radosgw_frontend_type == 'civetweb' else 'endpoint' }}=[{{ hostvars[host][interface][ip_version][0]['address'] }}]:{{ radosgw_frontend_port }} {{ radosgw_frontend_options }}
|
2017-10-19 00:03:30 +08:00
|
|
|
|
{% endif %}
|
2017-10-12 00:29:34 +08:00
|
|
|
|
{% endif %}
|
2014-03-19 19:40:02 +08:00
|
|
|
|
{% endfor %}
|
2014-03-06 20:54:37 +08:00
|
|
|
|
{% endif %}
|
2015-03-23 22:08:58 +08:00
|
|
|
|
|
2017-10-25 21:45:37 +08:00
|
|
|
|
{% if inventory_hostname in groups.get(nfs_group_name, []) and inventory_hostname not in groups.get(rgw_group_name, []) %}
|
2017-09-11 11:34:36 +08:00
|
|
|
|
{% for host in groups[nfs_group_name] %}
|
2018-09-19 00:10:57 +08:00
|
|
|
|
{% set _rgw_hostname = hostvars[host]['rgw_hostname'] | default(hostvars[host]['ansible_hostname']) %}
|
2017-09-11 11:34:36 +08:00
|
|
|
|
{% if nfs_obj_gw %}
|
2018-09-19 00:10:57 +08:00
|
|
|
|
[client.rgw.{{ _rgw_hostname }}]
|
|
|
|
|
host = {{ _rgw_hostname }}
|
|
|
|
|
keyring = /var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ _rgw_hostname }}/keyring
|
2017-09-11 11:34:36 +08:00
|
|
|
|
log file = /var/log/ceph/{{ cluster }}-rgw-{{ hostvars[host]['ansible_hostname'] }}.log
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% endfor %}
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
2017-10-08 21:16:40 +08:00
|
|
|
|
{% if inventory_hostname in groups.get(restapi_group_name, []) %}
|
2015-03-23 22:08:58 +08:00
|
|
|
|
[client.restapi]
|
2016-03-22 22:11:12 +08:00
|
|
|
|
{% if restapi_interface != "interface" %}
|
|
|
|
|
{% include 'client_restapi_interface.j2' %}
|
|
|
|
|
{% else %}
|
|
|
|
|
{% include 'client_restapi_address.j2' %}
|
|
|
|
|
{% endif %}
|
2015-12-16 23:11:14 +08:00
|
|
|
|
keyring = /var/lib/ceph/restapi/ceph-restapi/keyring
|
|
|
|
|
log file = /var/log/ceph/ceph-restapi.log
|
2015-03-23 22:08:58 +08:00
|
|
|
|
{% endif %}
|