]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
look at monitor_interface in hostvars when choosing interface or address 701/head
authorAndrew Schoen <aschoen@redhat.com>
Fri, 8 Apr 2016 19:23:12 +0000 (14:23 -0500)
committerAndrew Schoen <aschoen@redhat.com>
Fri, 8 Apr 2016 19:23:12 +0000 (14:23 -0500)
This fixes a bug where monitor_interface might be set in your inventory
file and not by using group_vars or --extra-vars causing the template to
use the default address of 0.0.0.0 instead of the defined
monitor_interface.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
roles/ceph-common/templates/ceph.conf.j2

index 9f44559e13d43dde3eac33cbd1eadb12d49cb11b..520e1a1c042bd13f719a668e2af752f2ea66dca2 100644 (file)
@@ -99,7 +99,7 @@ host = {{ hostvars[host]['ansible_fqdn'] }}
 [mon.{{ hostvars[host]['ansible_hostname'] }}]
 host = {{ hostvars[host]['ansible_hostname'] }}
 {% endif %}
-{% if monitor_interface != "interface" %}
+{% if hostvars[host]['monitor_interface'] != "interface" %}
 {% include 'mon_addr_interface.j2' %}
 {% else %}
 {% include 'mon_addr_address.j2' %}