From: Alessandro Corbelli Date: Wed, 12 Mar 2014 14:34:54 +0000 (+0100) Subject: Fix ceph.conf if mons are unreachable X-Git-Tag: v1.0.0~384^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2530083751b7308b286ee819ba0aca633270cf47;p=ceph-ansible.git Fix ceph.conf if mons are unreachable --- diff --git a/roles/common/templates/ceph.conf.j2 b/roles/common/templates/ceph.conf.j2 index 8c9cccabd..06ef6e0ff 100644 --- a/roles/common/templates/ceph.conf.j2 +++ b/roles/common/templates/ceph.conf.j2 @@ -31,9 +31,11 @@ [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]