June 2018
Beginner
578 pages
13h 39m
English
To provide a list of hosts, we need to provide an inventory list. This is in the form of a hosts file.
In its simplest form, our hosts file could contain a single line:
192.168.50.4.nip.io ansible_user=vagrant
What this is telling Ansible is that the host we want to contact is 192.168.50.4.nip.io and to use the username of vagrant. If we didn't provide the username, it would fall back to the user you are logged into your Ansible control host as, which in my case is simple—the user russ, which does not exist on the Vagrant box. There is a copy of the hosts file called hosts-simple in the Chapter02 folder of the repository alongside the Vagrantfile we used to launch the Vagrant box.
To run the setup command, we need to run ...
Read now
Unlock full access