mirror of https://github.com/ceph/ceph-ansible.git
ceph-common: fixes bug related to monitor_interface set in inventory
The ceph.conf template needs to look for the value of monitor_interface in hostvars[host] because there might be different values set per host. Signed-off-by: Andrew Schoen <aschoen@redhat.com>pull/1666/head
parent
b9be96983c
commit
a9a3d24a3d
|
@ -46,9 +46,9 @@ mon host = {% for host in groups[mon_group_name] -%}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
{% if ip_version == 'ipv4' -%}
|
{% if ip_version == 'ipv4' -%}
|
||||||
{{ hostvars[host]['ansible_' + monitor_interface][ip_version]['address'] }}
|
{{ hostvars[host]['ansible_' + hostvars[host]['monitor_interface']][ip_version]['address'] }}
|
||||||
{%- elif ip_version == 'ipv6' -%}
|
{%- elif ip_version == 'ipv6' -%}
|
||||||
[{{ hostvars[host]['ansible_' + monitor_interface][ip_version][0]['address'] }}]
|
[{{ hostvars[host]['ansible_' + hostvars[host]['monitor_interface']][ip_version][0]['address'] }}]
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{% if not loop.last -%},{%- endif %}
|
{% if not loop.last -%},{%- endif %}
|
||||||
|
|
Loading…
Reference in New Issue