From 3386578954b808109e556b20d55bc18cd9c08fab Mon Sep 17 00:00:00 2001 From: Gauvain Pocentek Date: Fri, 10 Oct 2014 15:20:21 +0200 Subject: [PATCH] Fix the mon.* generation in ceph.conf The ceph.conf.j2 template currently always uses the current host facts to get the IP address of each host in the mon loop. This is not the expected behavior. This patch uses the correct facts to get the IP. --- roles/ceph-common/templates/ceph.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/ceph-common/templates/ceph.conf.j2 b/roles/ceph-common/templates/ceph.conf.j2 index bb13b85ae..0b30ba839 100644 --- a/roles/ceph-common/templates/ceph.conf.j2 +++ b/roles/ceph-common/templates/ceph.conf.j2 @@ -63,7 +63,7 @@ {% 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'] }} + mon addr = {{ hostvars[host]['ansible_' + hostvars[host]['monitor_interface'] ]['ipv4']['address'] }} {% endif %} {% endfor %} -- 2.39.5