From: Gauvain Pocentek Date: Fri, 10 Oct 2014 13:20:21 +0000 (+0200) Subject: Fix the mon.* generation in ceph.conf X-Git-Tag: v1.0.0~323^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F126%2Fhead;p=ceph-ansible.git 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. --- 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 %}