From: Andrew Schoen Date: Fri, 8 Apr 2016 19:23:12 +0000 (-0500) Subject: look at monitor_interface in hostvars when choosing interface or address X-Git-Tag: v1.0.4~7^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=5031234d66b91a11265259e6f7375db3297a3727;p=ceph-ansible.git look at monitor_interface in hostvars when choosing interface or address 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 --- diff --git a/roles/ceph-common/templates/ceph.conf.j2 b/roles/ceph-common/templates/ceph.conf.j2 index 9f44559e1..520e1a1c0 100644 --- a/roles/ceph-common/templates/ceph.conf.j2 +++ b/roles/ceph-common/templates/ceph.conf.j2 @@ -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' %}