]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
use hostvars for monitor interface in ceph.conf if available, else, fallback to just... 389/head
authordexter <dgenterone@acale.ph>
Thu, 27 Aug 2015 16:41:15 +0000 (00:41 +0800)
committerdexter <dgenterone@acale.ph>
Thu, 27 Aug 2015 16:41:15 +0000 (00:41 +0800)
roles/ceph-common/templates/ceph.conf.j2

index df051ccf92a92ee2efd451cd825bb75ea51e634f..fc19de1a00ca109000772b504406842c84c391fe 100644 (file)
@@ -91,7 +91,7 @@
   {% if hostvars[host]['ansible_hostname'] is defined %}
   [mon.{{ hostvars[host]['ansible_hostname'] }}]
     host = {{ hostvars[host]['ansible_hostname'] }}
-    mon addr = {{ hostvars[host]['ansible_' + hostvars[host]['monitor_interface']]['ipv4']['address'] }}
+    mon addr = {{ hostvars[host]['ansible_' + (hostvars[host]['monitor_interface'] if hostvars[host]['monitor_interface'] is defined else monitor_interface) ]['ipv4']['address'] }}
   {% endif %}
 {% endfor %}