Skip to content
Snippets Groups Projects
Commit 8fc8d327 authored by Jeffrey Zhang's avatar Jeffrey Zhang
Browse files

Fix mongodb cluster using wrong network interface

MongoDB cluster only uses api_interface.

Change-Id: If24a1c9bd685b268068cb676a28316636af52b78
Closes-Bug: #1626339
parent 56445484
No related branches found
No related tags found
No related merge requests found
...@@ -6,7 +6,7 @@ printjson(rs.initiate( ...@@ -6,7 +6,7 @@ printjson(rs.initiate(
{% for host in groups["mongodb"] %} {% for host in groups["mongodb"] %}
{ {
"_id" : {{ loop.index }}, "_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 %} }{% if not loop.last %},{% endif %}
{% endfor %} {% endfor %}
] ]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment