ceph-ansible/roles/ceph-common/templates/mon_addr_interface.j2

8 lines
384 B
Django/Jinja

mon host = {% for host in groups[mon_group_name] %}
{% for key in hostvars[host].iterkeys() %}
{% if hostvars[host][key]['macaddress'] is defined and hostvars[host][key]['device'] is defined and hostvars[host][key]['device'] == monitor_interface %}
{{ hostvars[host][key]['ipv4']['address'] }}
{% endif %}
{% endfor %}
{% if not loop.last %},{% endif %}{% endfor %}