mirror of https://github.com/ceph/ceph-ansible.git
109 lines
4.0 KiB
Django/Jinja
109 lines
4.0 KiB
Django/Jinja
#jinja2: trim_blocks: "true", lstrip_blocks: "true"
|
|
# {{ ansible_managed }}
|
|
|
|
[global]
|
|
{% if not cephx %}
|
|
auth cluster required = none
|
|
auth service required = none
|
|
auth client required = none
|
|
auth supported = none
|
|
{% endif %}
|
|
{% if not mon_containerized_deployment_with_kv %}
|
|
fsid = {{ fsid }}
|
|
{% endif %}
|
|
max open files = {{ max_open_files }}
|
|
{% if common_single_host_mode is defined %}
|
|
osd crush chooseleaf type = 0
|
|
{% endif %}
|
|
[client]
|
|
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
|
|
|
|
[mon]
|
|
{% if not mon_containerized_deployment_with_kv %}
|
|
{% for host in groups[mon_group_name] %}
|
|
{% if hostvars[host]['ansible_fqdn'] is defined and mon_use_fqdn %}
|
|
[mon.{{ hostvars[host]['ansible_fqdn'] }}]
|
|
host = {{ hostvars[host]['ansible_fqdn'] }}
|
|
{% elif hostvars[host]['ansible_hostname'] is defined %}
|
|
[mon.{{ hostvars[host]['ansible_hostname'] }}]
|
|
host = {{ hostvars[host]['ansible_hostname'] }}
|
|
{% endif %}
|
|
# we need to check if monitor_interface is defined in the inventory per host or if it's set in a group_vars file
|
|
{% if (hostvars[host]['monitor_interface'] is defined and hostvars[host]['monitor_interface'] != "interface") or monitor_interface != "interface" %}
|
|
{% include 'mon_addr_interface.j2' %}
|
|
{% else %}
|
|
{% include 'mon_addr_address.j2' %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
[osd]
|
|
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 }}
|
|
{% if cluster_network is defined %}
|
|
cluster_network = {{ cluster_network }}
|
|
{% endif %}
|
|
{% if public_network is defined %}
|
|
public_network = {{ public_network }}
|
|
{% endif %}
|
|
{% 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 %}
|
|
|
|
{% if groups[mds_group_name] is defined %}
|
|
{% for host in groups[mds_group_name] %}
|
|
{% if hostvars[host]['ansible_fqdn'] is defined and mds_use_fqdn %}
|
|
[mds.{{ hostvars[host]['ansible_fqdn'] }}]
|
|
host = {{ hostvars[host]['ansible_fqdn'] }}
|
|
{% elif hostvars[host]['ansible_hostname'] is defined %}
|
|
[mds.{{ hostvars[host]['ansible_hostname'] }}]
|
|
host = {{ hostvars[host]['ansible_hostname'] }}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
{% if groups[rgw_group_name] is defined %}
|
|
{% for host in groups[rgw_group_name] %}
|
|
{% if hostvars[host]['ansible_hostname'] is defined %}
|
|
[client.rgw.{{ hostvars[host]['ansible_hostname'] }}]
|
|
{% if radosgw_dns_name is defined %}
|
|
rgw dns name = {{ radosgw_dns_name }}
|
|
{% endif %}
|
|
host = {{ hostvars[host]['ansible_hostname'] }}
|
|
keyring = /var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ hostvars[host]['ansible_hostname'] }}/keyring
|
|
rgw socket path = /tmp/radosgw-{{ hostvars[host]['ansible_hostname'] }}.sock
|
|
log file = /var/log/ceph/{{ cluster }}-rgw-{{ hostvars[host]['ansible_hostname'] }}.log
|
|
rgw data = /var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ hostvars[host]['ansible_hostname'] }}
|
|
{% if radosgw_frontend == 'civetweb' %}
|
|
rgw frontends = civetweb port={{ radosgw_civetweb_bind_ip }}:{{ radosgw_civetweb_port }}
|
|
{% endif %}
|
|
{% if radosgw_keystone %}
|
|
rgw keystone url = {{ radosgw_keystone_url }}
|
|
rgw keystone admin token = {{ radosgw_keystone_admin_token }}
|
|
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 }}
|
|
nss db path = {{ radosgw_nss_db_path }}
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
{% if groups[restapi_group_name] is defined %}
|
|
[client.restapi]
|
|
{% if restapi_interface != "interface" %}
|
|
{% include 'client_restapi_interface.j2' %}
|
|
{% else %}
|
|
{% include 'client_restapi_address.j2' %}
|
|
{% endif %}
|
|
keyring = /var/lib/ceph/restapi/ceph-restapi/keyring
|
|
log file = /var/log/ceph/ceph-restapi.log
|
|
{% endif %}
|