]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
common: reformat mon_initial_members with indention
authorAndrew Schoen <aschoen@redhat.com>
Tue, 8 Nov 2016 15:58:35 +0000 (09:58 -0600)
committerAndrew Schoen <aschoen@redhat.com>
Tue, 8 Nov 2016 16:35:43 +0000 (10:35 -0600)
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
Resolves: testing#updates

roles/ceph-common/templates/ceph.conf.j2

index 7cf82fe5fefbcf55b6a1306ca1ee63d1f3e9e36a..5b50e1d3ed8540b4fc7d99f18037849b18a64b6e 100644 (file)
@@ -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 %}