Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Shall I version the .vagrant folder

We have a vagrant project where we manage our production machines, what will be the best way for us to share the their status?

For now I've shared the .vagrant folder via the git repo? Is this the best way to do it?

like image 611
Calin Avatar asked Apr 16 '14 15:04

Calin


People also ask

What is Vagrant shared folder?

Vagrant automatically syncs files to and from the guest machine. This way you can edit files locally and run them in your virtual development environment. By default, Vagrant shares your project directory (the one containing the Vagrantfile) to the /vagrant directory in your guest machine.

What is NFS in vagrant?

NFS is a faster way of sharing your project's files between host and guests that sync the files instantly. To use NFS with Vagrant, nfs-utils package needs to be installed and nfs-server needs to be running. If it is not, run: $ sudo dnf install nfs-utils && sudo systemctl enable nfs-server.


1 Answers

Do not include the .vagrant folder into version control as that includes specifics to the actual initialize VM which is different on each initialized instance and not intended to be included in version control. The best thing to include is the Vagrantfile and any configuration management scripts which provision the VM.

like image 158
DanCat Avatar answered Sep 21 '22 06:09

DanCat