-
Clone this repository git clone https://github.com/harshalk91/mongo-replica-set-new.git
-
Change diretory cd mongo-replica-set-new
-
Create files touch vault_pass.txt & enter the secret password
-
Copy pem file to root location of this project
-
Edit ansible.cfg and enter path for vault_pass.txt and pem file
-
Launch instanecs ansible-playbook site.yml --tags=launch-instance
-
Create replica set:
ansible-playbook site.yml --tags=primary
ansible-playbook site.yml --tags=slave
ansible-playbook site.yml --tags=arbiter