As we discussed in Chapter 2, Managing Vagrant Boxes and Projects, we can instruct Vagrant to run a series of SSH commands on the VM. This can be used to provision the server.
There are two ways to use SSH provisioning:
Path: This provides a file to execute
Inline: This is used to provide specific commands to run
Both of these are shown as follows:
config.vm.provision "shell", path: "provision/setup.sh" config.vm.provision "shell", inline: "apt-get install apache2"