Provisioning with external shell scripts
While inline scripts can be a useful tool to execute larger command blocks, some provisioning operations are so large and/or complex that it can be useful to create and maintain them separately from the Vagrantfile itself. Maintaining these scripts separately can also make maintaining provisioning scripts and Vagrantfiles much simpler.
In this recipe, we'll modify the
nginx-install script, which was created in the previous recipe. In that example, a provisioning script was defined within a Ruby variable: a string embedded within the Vagrantfile itself. When provisioning scripts begin growing to involve multiple steps or different logic, it can be difficult to create and modify scripts within ...