summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/database/templates/replica.js
blob: dd5fc575661880a7912c08720f6884d10c7b9f1a (plain)
1
2
3
4
5
6
7
8
config = { _id:"compass", members:[
{% for host in haproxy_hosts.values() %}
{% set pair = '%s:27017' % host %}
    {_id:{{ loop.index0 }},host:"{{ pair }}",priority:{{ host_index[inventory_hostname] + 1 }}},
{% endfor %}
]
};
rs.initiate(config);