Problem setting

Installing packages in an empty Vagrant machine

An empty Vagrant machine is distributed to users as a bundle of Vagrantfile and an installation script. Read the section Scripts for installing ready-made packages and make a Bash installation script.

You may want to distribute .bashrc and .rsyncexlude files too, as described in the section Setting up a default environment with .bashrc, but that is easiest done by letting the installation script download the files from site where they are available. Relevant lines may be

$ cd $HOME
$ wget http://tinyurl.com/m88bljf/.bashrc
$ wget http://tinyurl.com/m88bljf/.rsyncexclude

To ensure that the user's initialization process of the machine invokes an installation of the desired packages, you need to add a line to Vagrantfile that runs the Bash script. Say the name of the script is install_minimal.sh. The relevant line is shown below:

Vagrant.configure("2") do |config|
  ...
  # Run installation
  config.vm.provision :shell, :path => "install_minimal.sh"
  ...
end

Users must now have the files Vagrantfile and install_minimal.sh to create a complete Vagrant machine on their computers.