rst
- Official website: https://www.vagrantup.com/
- Version: 2.2.3
- License: MIT License
You can find the Vagrant's latest version in the link https://www.vagrantup.com/ downloads.html . Also, you can install it with your package manager (check the version before install it).
Vagrant commands usually have the following structure: vagrant command
[<args>]
but in this particular case, we have custom options that help with our ansible configuration so the structure changes to: vagrant
--custom-option=option -- command [<args>]
Note
* Be careful with the spaces between the double minus and the command. * If you use a diferent configuration for vagrant remember to delete the custom option --custom-option=option --
to use the vagrant's usual commands
Use the
up
command alongside the--provision
argument to import the VM into VirtualBox and run ansible.vagrant --machine=<single> -- up --provision
- Check if ansible ran successfully. If it didn't, find the error and patch it.
Test your patch by syncing the changes and re-provision.
vagrant --machine=<single> -- rsync vagrant --machine=<single> -- provision
Note
Our Vagrant's custom options are:
- machine: Machine hostname for ansible and the playbooks's name.
- vault-id: The password file for ansible.
Useful commands
- ssh: Connects to machine via SSH.
vagrant ssh
- reload: Restarts vagrant machine, loads new Vagrantfile configuration.
vagrant reload
- halt: Stops the vagrant machine.
vagrant halt
- destroy: Stops and deletes all traces of the vagrant machine.
vagrant destroy
For more help run vagrant -h
or vagrant <command> -h
for help on any individual command.
The primary function of the Vagrantfile is to describe the type of machine required for a project, and how to configure and provision these machines1 . The syntax of Vagrantfile is Ruby.
This vagrantfile is based on a vagranfile with custom variables to ease the use of ansible_local handling and other options.
src/vagrantfile
Note
For more information about vagrantfile and how to create it go to https://www.vagrantup.com/docs/vagrantfile/
vagrant-storage/index
- Author
- Manuela Carrasco Pinzón <mcarras1@eafit.edu.co>
- Tomás Felipe Llano Rios <tllanos@eafit.edu.co>
Vagrantfile. (n.d.). Retrieved January 21, 2019, from https://www.vagrantup.com/docs/vagrantfile/↩