]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Fix ceph.conf if mons are unreachable 39/head
authorAlessandro Corbelli <alessandro.corbelli@guest.it>
Wed, 12 Mar 2014 14:34:54 +0000 (15:34 +0100)
committerAlessandro Corbelli <alessandro.corbelli@guest.it>
Wed, 12 Mar 2014 14:34:54 +0000 (15:34 +0100)
roles/common/templates/ceph.conf.j2

index 8c9cccabdbf61477e3ef12edeb3b312007efdd44..06ef6e0ff81e4311e45cbcaf1f43618c1aa1cdd6 100644 (file)
 
 [mon]
 {% for host in groups['mons'] %}
+  {% if hostvars[host]['ansible_hostname'] is defined %}
   [mon.{{ hostvars[host]['ansible_hostname'] }}]
     host = {{ hostvars[host]['ansible_hostname'] }}
     mon addr = {{ hostvars[host]['ansible_' + monitor_interface ]['ipv4']['address'] }}
+  {% endif %}
 {% endfor %}
 
 [osd]