Merge "Fix mongodb cluster using wrong network interface"

This commit is contained in:
Jenkins 2017-03-23 16:19:19 +00:00 committed by Gerrit Code Review
commit 379424240b

View File

@ -6,7 +6,7 @@ printjson(rs.initiate(
{% for host in groups["mongodb"] %}
{
"_id" : {{ loop.index }},
"host" : "{{ hostvars[host]['ansible_' + hostvars[host]['storage_interface']]['ipv4']['address'] }}:{{ mongodb_port }}"
"host" : "{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ mongodb_port }}"
}{% if not loop.last %},{% endif %}
{% endfor %}
]