So I’m new to Vagrant and I’m reading through “Hands-on DevOps with Vagrant”. I’m also looking at skillshare and other websites to expand my knowledge base.
One thing I would like to do is be able to configure a new VM with certain basic staples. For instance I have a .vimrc file I use with all my systems. With Vagrant, I’ve simply used
config.vm.provision "file", source: "~/.vimrc", destination: "/home/vagrant/.vimrc"
to transfer. However, when I make further changes to my Vagrantfile I don’t want to necessarily retransfer the .vimrc file when I include the –provision option.
Here is another situation. my .bashrc settings. I don’t want to transfer my whole .bashrc file from my other systems, but want to pass my alias commands to the .bashrc file that’s created on the new VM. I’ve done that by echoing the alias’s to the .bashrc file, however if I include the –provision option they it will add all the alias’s again.
Are there command line arguments when I run vagrant up --provision or vagrant reload --provision that I can use to identify which provisions I want to trigger? Or something of that nature?