]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Check to see if hostvars[host]['monitor_interface'] is defined 712/head
authorAndrew Schoen <aschoen@redhat.com>
Wed, 13 Apr 2016 18:34:51 +0000 (13:34 -0500)
committerAndrew Schoen <aschoen@redhat.com>
Wed, 13 Apr 2016 18:34:51 +0000 (13:34 -0500)
This fixes https://github.com/ceph/ceph-ansible/issues/711

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

index 520e1a1c042bd13f719a668e2af752f2ea66dca2..113e738c3d4b72c4fe3b682db5183ab7a33fa79c 100644 (file)
@@ -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' %}