Vagrant and you copy
Vagrantfile from older project to new one.
Then you always need to edit it to accommodate the requirements of a new project.
Solution: Ruby & YAML
Vagrantfile is just
Ruby code you can simplify your process and have
all Vagrant related code in one repository.
Create a Vagrant project
Here you want to include some
recipes to script your environment. Then, create a
What goes into new projects
To reuse previous
Vagrantfile and have specific setting per project,
you’ll need to add another (almost dummy)
Vagrantfile to the new
project with one line of ruby code.
Also create new
server_config.yml file inside the new project.
Now you can run
vagrant up and other vagrant commands from new project.
This is not the end
With time, your project environment requirements will grow.
Break up configuration to smaller parts or files, use Ruby modules,
anything to automate and simplify your environment.