Original address
As part of the vagrant up process, provisioner in vagrant allows you to install software automatically, change configuration, and so on.
This is useful because box is usually not perfectly built for your use case unless you want to manually install the software using vagrant ssh. But by using a Provisioning system built into the Vagrant, it automates the process and makes it repeatable. Most importantly, it doesn't require human interaction, so you can vagrant destroy and vagrant up with a single command, and have a completely ready-to-use working environment.
Vagrant offers a variety of options for configuring machines, from simple shell scripts to more complex industry standard configuration management systems.
If you have never used a configuration management system before, we recommend that you start with a basic shell script. 1. When Provisioning occurs
Provisioning occurs at certain points in the life cycle of your Vagrant environment:
Run provisioning when the first vagrant up environment is created. If you have created an environment and need to restore or start the machine, they will not run unless you explicitly provide the--PROVISION flag.
When using vagrant provision in a running environment.
When calling vagrant Reload--provision. The--provision flag must exist to force the provisioning to run.
You can also explicitly specify that you do not run Provisioner when you start the environment by using the--no-provision parameter.