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?
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With