From: Andrew Schoen Date: Wed, 13 Apr 2016 18:34:51 +0000 (-0500) Subject: Check to see if hostvars[host]['monitor_interface'] is defined X-Git-Tag: v1.0.5~2^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=a2b8ef8c1d956dab986c29dfb3065cba9877781f;p=ceph-ansible.git Check to see if hostvars[host]['monitor_interface'] is defined This fixes https://github.com/ceph/ceph-ansible/issues/711 Signed-off-by: Andrew Schoen --- diff --git a/roles/ceph-common/templates/ceph.conf.j2 b/roles/ceph-common/templates/ceph.conf.j2 index 520e1a1c0..113e738c3 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 hostvars[host]['monitor_interface'] != "interface" %} +{% if hostvars[host]['monitor_interface'] is defined and hostvars[host]['monitor_interface'] != "interface" %} {% include 'mon_addr_interface.j2' %} {% else %} {% include 'mon_addr_address.j2' %}