This ansible are from tutorial mydbops
Edit the hosts node, replicacfg and standalone, also generate ssh cert for authentication ssh, place it on root dir. Then run command
ansible-playbook site.yml -i hosts -K
-K is for sudo password (Ubuntu or Debian)
If want to change mongodb/mongos port edit on group_vars/all
This ansible work with Ubuntu (Maybe debian too), and CentOS / RHEL
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.