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 %}
|
2015-12-16 23:11:14 +08:00
|
|
|
max open files = {{ max_open_files }}
|
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 #}
|
|
|
|
{% if groups[mon_group_name] is defined %}
|
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 %}
|
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 -%}
|
|
|
|
mon host = {% for host in groups[mon_group_name] -%}
|
2017-07-04 23:29:26 +08:00
|
|
|
{% if monitor_address_block | length > 0 %}
|
2017-06-07 19:26:04 +08:00
|
|
|
{% if ip_version == 'ipv4' -%}
|
|
|
|
{{ hostvars[host]['ansible_all_' + ip_version + '_addresses'] | ipaddr(monitor_address_block) | first }}
|
|
|
|
{%- elif ip_version == 'ipv6' -%}
|
|
|
|
[{{ hostvars[host]['ansible_all_' + ip_version + '_addresses'] | ipaddr(monitor_address_block) | first }}]
|
|
|
|
{%- 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 %}
|
|
|
|
{%- else -%}
|
|
|
|
{% if ip_version == 'ipv4' -%}
|
|
|
|
{{ hostvars[host]['ansible_' + monitor_interface][ip_version]['address'] }}
|
|
|
|
{%- elif ip_version == 'ipv6' -%}
|
|
|
|
[{{ hostvars[host]['ansible_' + monitor_interface][ip_version][0]['address'] }}]
|
|
|
|
{%- endif %}
|
|
|
|
{%- endif %}
|
|
|
|
{% if not loop.last -%},{%- endif %}
|
|
|
|
{%- endfor %}
|
|
|
|
{%- endif %}
|
|
|
|
|
2017-04-13 01:57:33 +08:00
|
|
|
{% if containerized_deployment %}
|
2016-05-27 22:37:07 +08:00
|
|
|
fsid = {{ fsid }}
|
2017-06-07 19:26:04 +08:00
|
|
|
mon host = {% for host in groups[mon_group_name] -%}
|
2017-07-04 23:29:26 +08:00
|
|
|
{% if monitor_address_block | length > 0 %}
|
2017-06-07 19:26:04 +08:00
|
|
|
{% if ip_version == 'ipv4' -%}
|
|
|
|
{{ hostvars[host]['ansible_all_' + ip_version + '_addresses'] | ipaddr(monitor_address_block) | first }}
|
|
|
|
{%- elif ip_version == 'ipv6' -%}
|
|
|
|
[{{ hostvars[host]['ansible_all_' + ip_version + '_addresses'] | ipaddr(monitor_address_block) | first }}]
|
|
|
|
{%- 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 %}
|
|
|
|
{%- else -%}
|
2017-07-05 00:08:59 +08:00
|
|
|
{% set interface = ["ansible_",monitor_interface]|join %}
|
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 %}
|
|
|
|
{%- endif %}
|
|
|
|
{% if not loop.last -%},{%- endif %}
|
|
|
|
{%- endfor %}
|
2016-05-27 22:37:07 +08:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if public_network is defined %}
|
2016-11-03 22:25:03 +08:00
|
|
|
public network = {{ public_network }}
|
2016-05-27 22:37:07 +08:00
|
|
|
{% endif %}
|
|
|
|
{% if cluster_network is defined %}
|
2016-11-03 22:25:03 +08:00
|
|
|
cluster network = {{ cluster_network }}
|
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
|
|
|
|
|
|
|
[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
|
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 %}
|
2014-08-30 08:58:27 +08:00
|
|
|
|
2015-07-02 17:08:59 +08:00
|
|
|
{% if groups[mds_group_name] is defined %}
|
2015-06-11 08:42:41 +08:00
|
|
|
{% for host in groups[mds_group_name] %}
|
2016-03-01 18:38:59 +08:00
|
|
|
{% if hostvars[host]['ansible_fqdn'] is defined and mds_use_fqdn %}
|
|
|
|
[mds.{{ hostvars[host]['ansible_fqdn'] }}]
|
|
|
|
host = {{ hostvars[host]['ansible_fqdn'] }}
|
2016-03-03 18:03:03 +08:00
|
|
|
{% elif hostvars[host]['ansible_hostname'] is defined %}
|
2015-12-16 23:11:14 +08:00
|
|
|
[mds.{{ hostvars[host]['ansible_hostname'] }}]
|
|
|
|
host = {{ hostvars[host]['ansible_hostname'] }}
|
|
|
|
{% endif %}
|
2014-03-04 02:08:51 +08:00
|
|
|
{% endfor %}
|
2016-03-03 18:03:03 +08:00
|
|
|
{% endif %}
|
2014-03-06 20:54:37 +08:00
|
|
|
|
2015-07-06 23:36:45 +08:00
|
|
|
{% if groups[rgw_group_name] is defined %}
|
2015-06-11 08:42:41 +08:00
|
|
|
{% for host in groups[rgw_group_name] %}
|
2014-03-20 19:14:43 +08:00
|
|
|
{% if hostvars[host]['ansible_hostname'] is defined %}
|
2015-06-12 17:47:08 +08:00
|
|
|
[client.rgw.{{ hostvars[host]['ansible_hostname'] }}]
|
2015-12-16 23:11:14 +08:00
|
|
|
{% if radosgw_dns_name is defined %}
|
|
|
|
rgw dns name = {{ radosgw_dns_name }}
|
|
|
|
{% endif %}
|
|
|
|
host = {{ hostvars[host]['ansible_hostname'] }}
|
2016-03-29 21:37:31 +08:00
|
|
|
keyring = /var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ hostvars[host]['ansible_hostname'] }}/keyring
|
2015-12-16 23:11:14 +08:00
|
|
|
rgw socket path = /tmp/radosgw-{{ hostvars[host]['ansible_hostname'] }}.sock
|
2016-03-29 21:37:31 +08:00
|
|
|
log file = /var/log/ceph/{{ cluster }}-rgw-{{ hostvars[host]['ansible_hostname'] }}.log
|
|
|
|
rgw data = /var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ hostvars[host]['ansible_hostname'] }}
|
2017-01-16 22:14:02 +08:00
|
|
|
rgw frontends = civetweb {{ radosgw_civetweb_options }}
|
2017-01-16 22:29:56 +08:00
|
|
|
rgw resolve cname = {{ radosgw_resolve_cname | bool }}
|
2015-12-16 23:11:14 +08:00
|
|
|
{% if radosgw_keystone %}
|
|
|
|
rgw keystone url = {{ radosgw_keystone_url }}
|
2016-07-15 03:27:03 +08:00
|
|
|
rgw keystone api version = {{ radosgw_keystone_api_version }}
|
2016-07-11 20:52:11 +08:00
|
|
|
{% if radosgw_keystone_auth_method == 'admin_token' %}
|
2015-12-16 23:11:14 +08:00
|
|
|
rgw keystone admin token = {{ radosgw_keystone_admin_token }}
|
2016-07-11 20:52:11 +08:00
|
|
|
{% elif radosgw_keystone_auth_method == 'auth_token' %}
|
|
|
|
rgw keystone admin user = {{ radosgw_keystone_admin_user }}
|
|
|
|
rgw keystone admin password = {{ radosgw_keystone_admin_password }}
|
|
|
|
rgw keystone admin tenant = {{ radosgw_keystone_admin_tenant }}
|
2016-07-15 03:27:03 +08:00
|
|
|
rgw keystone admin domain = {{ radosgw_keystone_admin_domain }}
|
2016-07-11 20:52:11 +08:00
|
|
|
{% endif %}
|
2015-12-16 23:11:14 +08:00
|
|
|
rgw keystone accepted roles = {{ radosgw_keystone_accepted_roles }}
|
|
|
|
rgw keystone token cache size = {{ radosgw_keystone_token_cache_size }}
|
|
|
|
rgw keystone revocation interval = {{ radosgw_keystone_revocation_internal }}
|
|
|
|
rgw s3 auth use keystone = {{ radosgw_s3_auth_use_keystone }}
|
2016-07-15 03:09:31 +08:00
|
|
|
{% if radosgw_keystone_ssl | bool %}
|
2015-12-16 23:11:14 +08:00
|
|
|
nss db path = {{ radosgw_nss_db_path }}
|
|
|
|
{% endif %}
|
2014-03-20 19:14:43 +08:00
|
|
|
{% endif %}
|
2016-12-16 00:35:56 +08:00
|
|
|
{% if radosgw_usage_log | bool %}
|
|
|
|
rgw enable usage log = true
|
|
|
|
rgw usage log tick interval = {{ radosgw_usage_log_tick_interval }}
|
|
|
|
rgw usage log flush threshold = {{ radosgw_usage_log_flush_threshold }}
|
|
|
|
rgw usage max shards = {{ radosgw_usage_max_shards }}
|
|
|
|
rgw usage max user shards = {{ radosgw_usage_max_user_shards }}
|
|
|
|
{% endif %}
|
2017-01-16 22:27:44 +08:00
|
|
|
{% if radosgw_static_website | bool %}
|
|
|
|
rgw enable static website = {{ radosgw_static_website }}
|
|
|
|
rgw dns s3website name = {{ radosgw_dns_s3website_name }}
|
|
|
|
{% endif %}
|
2016-07-15 03:09:31 +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
|
|
|
|
2015-07-02 17:08:59 +08:00
|
|
|
{% if groups[restapi_group_name] is defined %}
|
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 %}
|