We need to have an inventory before we execute any commands or playbooks, so let's build an inventory and add a host to run some tasks.
Building a simple inventory
How to do it...
The INVENTORIES tab is located on the top bar. A Demo Inventory has already been created for us. We will create a new inventory and add a host there. Let's click on the +ADD button and select inventory from the menu.
![](https://static.packt-cdn.com/products/9781788295826/graphics/assets/61be9dd0-0753-491f-89bd-b89fc09956b3.png)
The new inventory page lets us define the name of the inventory and various parameters including variables. For example, for our cookbook inventory, we can add a variable, ansible_user, with the value as root. To add hosts and modify other tabs of the inventory, we'll have to save the inventory first.
Once we have saved...