From: Andrew Schoen Date: Tue, 8 Nov 2016 15:58:35 +0000 (-0600) Subject: common: reformat mon_initial_members with indention X-Git-Tag: v2.0~9^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=06ce643f7d29733f0a97dac21c392c45bef98a6f;p=ceph-ansible.git common: reformat mon_initial_members with indention Signed-off-by: Andrew Schoen Resolves: testing#updates --- diff --git a/roles/ceph-common/templates/ceph.conf.j2 b/roles/ceph-common/templates/ceph.conf.j2 index 7cf82fe5f..5b50e1d3e 100644 --- a/roles/ceph-common/templates/ceph.conf.j2 +++ b/roles/ceph-common/templates/ceph.conf.j2 @@ -17,7 +17,14 @@ osd crush chooseleaf type = 0 {% endif %} {# NOTE (leseb): the blank lines in-between are needed otherwise we won't get any line break #} {% if groups[mon_group_name] is defined %} -mon initial members = {% if groups[mon_group_name] is defined %}{% for host in groups[mon_group_name] %}{% if hostvars[host]['ansible_fqdn'] is defined and mon_use_fqdn %}{{ hostvars[host]['ansible_fqdn'] }}{% if not loop.last %},{% endif %}{% elif hostvars[host]['ansible_hostname'] is defined %}{{ hostvars[host]['ansible_hostname'] }}{% if not loop.last %},{% endif %}{% endif %}{% endfor %}{% endif %} +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 %} {% endif %} {% if not mon_containerized_deployment and not mon_containerized_deployment_with_kv %}