From the course: Learning Vagrant

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Vagrant provisioners

Vagrant provisioners - Vagrant Tutorial

From the course: Learning Vagrant

Start my 1-month free trial

Vagrant provisioners

- [Instructor] Vagrant provisioners are scripts that can be defined in a Vagrantfile or externally in a separate file. By default, provisioners are executed the first time a box runs. They're used to set up a base box for a particular purpose. Provisioners can install software, download application code, and set configurations needed for a particular developer environment. Let's suppose that we want to include Nginx as a part of a custom development box. We'll add a shell provisioner to our Vagrantfile to install Nginx as a part of the environment setup. First, let's destroy the box so we could return it to its initial state. In the terminal window type vagrant destroy and hit Y when prompted. This will delete the box in this environment, but the Ubuntu base box is still in the cache and the Vagrantfile is still here. Now type vagrant up and wait for the box to be re-imported and started. Once the box starts back up, connect with vagrant ssh and execute the following command nginx -v.…

Contents