diff options
-rw-r--r-- | deploy/adapters/ansible/roles/database/templates/replica.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/deploy/adapters/ansible/roles/database/templates/replica.js b/deploy/adapters/ansible/roles/database/templates/replica.js index d19db50d..dd5fc575 100644 --- a/deploy/adapters/ansible/roles/database/templates/replica.js +++ b/deploy/adapters/ansible/roles/database/templates/replica.js @@ -1,7 +1,7 @@ config = { _id:"compass", members:[ {% for host in haproxy_hosts.values() %} {% set pair = '%s:27017' % host %} - {_id:{{ loop.index0 }},host:"{{ pair }}",priority:{{ haproxy_hosts|length - loop.index0 }}}, + {_id:{{ loop.index0 }},host:"{{ pair }}",priority:{{ host_index[inventory_hostname] + 1 }}}, {% endfor %} ] }; |