January 2019
Intermediate to advanced
606 pages
15h 1m
English
The Ansible inventory file is used by Ansible to reference all known hosts and to which group they belong. A group is defined by placing its name in square brackets, groups can be nested inside other groups by the use of the children definition.
Before we add hosts to the inventory file, we first need to configure the remote nodes for SSH (without password); otherwise, we will have to enter a password every time Ansible tries to connect to a remote machine.
Generate an SSH key as follows:
$ ssh-keygen
The preceding command gives the following output:

Copy the key to the remote hosts:
$ ssh-copy-id mon1
The preceding ...
Read now
Unlock full access