diff --git a/roles/ceph-common/templates/ceph.conf.j2 b/roles/ceph-common/templates/ceph.conf.j2 index d3c73e093..170d67514 100644 --- a/roles/ceph-common/templates/ceph.conf.j2 +++ b/roles/ceph-common/templates/ceph.conf.j2 @@ -91,7 +91,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 %}