» Provisioning

Provisioners in Vagrant allow you to automatically install software, alter configurations,and more on the machine as part of the vagrant up process.

This is useful since boxes typically are notbuilt perfectly for your use case. Of course, if you want to just usevagrant ssh and install the software by hand, that works. But by usingthe provisioning systems built-in to Vagrant, it automates the process sothat it is repeatable. Most importantly, it requires no human interaction,so you can vagrant destroy and vagrant up and have a fully ready-to-gowork environment with a single command. Powerful.

Vagrant gives you multiple options for provisioning the machine, fromsimple shell scripts to more complex, industry-standard configurationmanagement systems.

If you've never used a configuration management system before, it isrecommended you start with basic shell scriptsfor provisioning.

You can find the full list of built-in provisioners and usage of theseprovisioners in the navigational area to the left.

» When Provisioning Happens

Provisioning happens at certain points during the lifetime of yourVagrant environment:

  • On the first vagrant up that creates the environment, provisioning is run.If the environment was already created and the up is just resuming a machineor booting it up, they will not run unless the —provision flag is explicitlyprovided.

  • When vagrant provision is used on a running environment.

  • When vagrant reload —provision is called. The —provision flag mustbe present to force provisioning.

You can also bring up your environment and explicitly not run provisionersby specifying —no-provision.