2014-03-04 02:08:51 +08:00
|
|
|
# {{ ansible_managed }}
|
|
|
|
|
|
|
|
[global]
|
|
|
|
{% if cephx %}
|
|
|
|
auth cluster required = cephx
|
|
|
|
auth service required = cephx
|
|
|
|
auth client required = cephx
|
|
|
|
{% else %}
|
|
|
|
auth cluster required = none
|
|
|
|
auth service required = none
|
|
|
|
auth client required = none
|
|
|
|
auth supported = none
|
|
|
|
{% endif %}
|
|
|
|
fsid = {{ fsid }}
|
|
|
|
mon_initial_members = {{ hostvars[groups['mons'][0]]['ansible_hostname'] }}
|
|
|
|
{% if pool_default_pg_num is defined %}
|
|
|
|
osd pool default pg num = {{ pool_default_pg_num }}
|
|
|
|
{% endif %}
|
|
|
|
{% if pool_default_pgp_num is defined %}
|
|
|
|
osd pool default pgp num = {{ pool_default_pgp_num }}
|
|
|
|
{% endif %}
|
|
|
|
{% if pool_default_size is defined %}
|
|
|
|
osd pool default size = {{ pool_default_size }}
|
|
|
|
{% endif %}
|
|
|
|
{% if pool_default_min_size is defined %}
|
|
|
|
osd pool default min size = {{ pool_default_min_size }}
|
|
|
|
{% endif %}
|
|
|
|
{% if pool_default_crush_rule is defined %}
|
|
|
|
osd pool default crush rule = {{ pool_default_crush_rule }}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
[mon]
|
|
|
|
{% for host in groups['mons'] %}
|
2014-03-12 22:34:54 +08:00
|
|
|
{% if hostvars[host]['ansible_hostname'] is defined %}
|
2014-03-04 02:08:51 +08:00
|
|
|
[mon.{{ hostvars[host]['ansible_hostname'] }}]
|
|
|
|
host = {{ hostvars[host]['ansible_hostname'] }}
|
2014-03-11 00:23:41 +08:00
|
|
|
mon addr = {{ hostvars[host]['ansible_' + monitor_interface ]['ipv4']['address'] }}
|
2014-03-12 22:34:54 +08:00
|
|
|
{% endif %}
|
2014-03-04 02:08:51 +08:00
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
[osd]
|
|
|
|
{% if osd_mkfs_type is defined %}
|
|
|
|
osd mkfs type = {{ osd_mkfs_type }}
|
|
|
|
{% endif %}
|
|
|
|
{% if osd_mkfs_type == "ext4" %}
|
|
|
|
filestore xattr use omap = true
|
|
|
|
{% endif %}
|
|
|
|
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 %}
|
|
|
|
|
2014-03-11 00:14:11 +08:00
|
|
|
{% if mds %}
|
2014-03-04 02:08:51 +08:00
|
|
|
[mds]
|
|
|
|
{% for host in groups['mdss'] %}
|
|
|
|
[mds.{{ hostvars[host]['ansible_hostname'] }}]
|
|
|
|
host = {{ hostvars[host]['ansible_hostname'] }}
|
|
|
|
{% endfor %}
|
2014-03-11 00:14:11 +08:00
|
|
|
{% endif %}
|