Let's get to the main part of this chapter: provisioning a Vagrant machine with Salt. We'll look at the masterless configuration setup for this section. We'll learn how to install the Nginx web server onto our Vagrant machine:
- Create a new folder/directory for this example. I'm calling mine vagrant-salt.
- Move into the new folder and run the vagrant init -m command to create a new Vagrantfile.
- We need to create some folders and files for Salt. Create a roots folder and a minionfiles folder. Inside the roots folder, create a file called top.sls and enter these contents:
base:
'*':
- base
Within the same folder (roots), create another file called base.sls and enter these contents:
nginx:
pkg.installed:
- name: nginx
The top file dictates what hosts to target. We can use...