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.
15 lines
523 B
15 lines
523 B
---
|
|
#This Playbooks adds shards to the mongos servers once everythig is added
|
|
|
|
|
|
- name: Create the file to initialize the mongod Shard
|
|
template: src=../roles/mongod/templates/shard_init.j2 dest=/tmp/shard_init_${inventory_hostname}.js
|
|
delegate_to: $item
|
|
with_items: ${groups.mongosservers}
|
|
|
|
- name: Add the shard to the mongos
|
|
shell: /usr/bin/mongo localhost:${mongos_port}/admin -u admin -p ${mongo_admin_pass} /tmp/shard_init_${inventory_hostname}.js
|
|
delegate_to: $item
|
|
with_items: ${groups.mongosservers}
|
|
|
|
|
|
|