Saltstack Official MongoDB Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

9 yıl önce
12345678910111213141516
  1. {%- from "mongodb/map.jinja" import server with context %}
  2. rs.initiate({
  3. "_id": "{{ server.replica_set }}",
  4. "members": [
  5. {%- for member in server.members %}
  6. {
  7. "_id": {{ loop.index0 }},
  8. {%- if member.priority is defined %}
  9. "priority": {{ member.priority }},
  10. {%- endif %}
  11. "host": "{{ member.host }}"
  12. }{% if not loop.last %},{% endif %}
  13. {%- endfor %}
  14. ]
  15. });
  16. rs.conf();