#
What is a Vagrantfile and what is used for ?
#
Vagrantfile
The Vagrantfile is a Ruby file used to configure Vagrant on a per-project basis. The main function of the Vagrantfile is to describe the virtual machines required for a project as well as how to configure and provision these machines.
Info
Vagrantfiles are portable across every platform Vagrant supports.
Info
Although the contents of a Vagrantfile are Ruby, knowledge of Ruby is not necessary to make modifications to the file since it is mostly simple variable assignment.
#
Lookup Path
When you run any vagrant command, Vagrant climbs up the directory tree looking for the first Vagrantfile it can find, starting first in the current directory. If Vagrantfile is not in the current directory, it will search the following paths in order for a Vagrantfile, until it finds one:
/home/paul/projects/myProject/Vagrantfile
/home/paul/projects/Vagrantfile
/home/paul/Vagrantfile
/home/Vagrantfile
/Vagrantfile
Info
In this example we are in the /home/paul/projects/myProject
directory.