From 26f4752bc475c2a85be6b08c90dc750341eac9f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Thu, 27 Jul 2017 15:50:38 +0200 Subject: [PATCH] common: only add a daemon section if we run on the host MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We don't want to have heterogeous ceph.conf anymore and believe that we should have the right section for the running daemon. If we don't do this and use profiles, e.g: rgw, we will get a new rgw section on some of the nodes. Signed-off-by: Sébastien Han --- roles/ceph-common/templates/ceph.conf.j2 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/roles/ceph-common/templates/ceph.conf.j2 b/roles/ceph-common/templates/ceph.conf.j2 index 93440fc14..6fdbfd4ed 100644 --- a/roles/ceph-common/templates/ceph.conf.j2 +++ b/roles/ceph-common/templates/ceph.conf.j2 @@ -112,6 +112,7 @@ filestore xattr use omap = true {% endif %} {% if groups[mds_group_name] is defined %} +{% if mds_group_name in group_names %} {% for host in groups[mds_group_name] %} {% if hostvars[host]['ansible_fqdn'] is defined and mds_use_fqdn %} [mds.{{ hostvars[host]['ansible_fqdn'] }}] @@ -122,8 +123,10 @@ host = {{ hostvars[host]['ansible_hostname'] }} {% endif %} {% endfor %} {% endif %} +{% endif %} {% if groups[rgw_group_name] is defined %} +{% if rgw_group_name in group_names %} {% for host in groups[rgw_group_name] %} {% if hostvars[host]['ansible_hostname'] is defined %} [client.rgw.{{ hostvars[host]['ansible_hostname'] }}] @@ -136,8 +139,10 @@ rgw frontends = civetweb port={{ radosgw_civetweb_bind_ip }}:{{ radosgw_civetweb {% endif %} {% endfor %} {% endif %} +{% endif %} {% if groups[restapi_group_name] is defined %} +{% if restapi_group_name in group_names %} [client.restapi] {% if restapi_interface != "interface" %} {% include 'client_restapi_interface.j2' %} @@ -147,3 +152,4 @@ rgw frontends = civetweb port={{ radosgw_civetweb_bind_ip }}:{{ radosgw_civetweb keyring = /var/lib/ceph/restapi/ceph-restapi/keyring log file = /var/log/ceph/ceph-restapi.log {% endif %} +{% endif %}