We can also create group within a group (Nested Groups) in Inventory file We can also create groups of hosts in Inventory file below are Examples Default hosts file is in “/etc/ansible/hosts”ġ92.168.122.22 (Example of a Host IP Address inside Inventory file) Hosts or groups of hosts can be referenced in a playbook or from the Ansible ad-hoc CLI.
Inventory File: Inventory file is an ini-like file, it contains IP address/hostname (should be resolved by DNS) of the devices to be automated by Ansible control machine.
Modules: Ansible modules are written in Python language they are referenced as tasks inside Ansible Playbook or inside Ansible ad-hoc cli tool using cli arguments.