Fix mongodb cluster using wrong network interface
MongoDB cluster only uses api_interface. Change-Id: If24a1c9bd685b268068cb676a28316636af52b78 Closes-Bug: #1626339
This commit is contained in:
parent
56445484d5
commit
8fc8d327b3
@ -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 %}
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user