A simple setup for creating a Vagrant box running a single-instance MongoDB server that gets provisioned by Ansible.
Although the MongoDB instance runs in a virtual machine, the guest's port 27017 is forwarded to the host's port 27017, so you will be able to connect to the MongoDB server from your host machine and from its network(s).
- Vagrant
- Ansible
- MongoDB client (optional)
git clone https://github.com/lee51/vagrant-ansible-mongo.git
cd vagrant-ansible-mongo
vagrant up
mongo --host localhost --port 27017
Adam Brett's Vagrant & Ansible Quickstart Tutorial