Ansible needs to be able to get an inventory of the machines that you want to configure in order to manage them. This can be done in many ways due to inventory plug-ins. Several different inventory plug-ins are included with the base install. We will go over these later in the book. For now, we will cover the simple host's file inventory.
The default Ansible inventory file is named hosts and is placed at
/etc/ansible. It is formatted like an
INI file. Group names are enclosed in square braces, and everything underneath it, down to the next group heading, gets assigned to that group. Machines can be in many groups at one time. Groups are used to allow you to configure many machines at once. You can use a group instead of a hostname ...