From 2530083751b7308b286ee819ba0aca633270cf47 Mon Sep 17 00:00:00 2001 From: Alessandro Corbelli Date: Wed, 12 Mar 2014 15:34:54 +0100 Subject: [PATCH] Fix ceph.conf if mons are unreachable --- roles/common/templates/ceph.conf.j2 | 2 ++ 1 file changed, 2 insertions(+) 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] -- 2.39.5