]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Fix the mon.* generation in ceph.conf 126/head
authorGauvain Pocentek <gauvain.pocentek@objectif-libre.com>
Fri, 10 Oct 2014 13:20:21 +0000 (15:20 +0200)
committerGauvain Pocentek <gauvain.pocentek@objectif-libre.com>
Fri, 10 Oct 2014 13:27:15 +0000 (15:27 +0200)
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

index bb13b85aea33e44a3f4a36d28ebc2626927f9cea..0b30ba8396ba9e3d8213fd6390c650ed84796a87 100644 (file)
@@ -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 %}