The inventory file (INI or YAML) lists managed hosts and organises them into groups ([webservers], [databases]). Hosts can have per-host vars; groups can have shared vars. Dynamic inventories pull hosts from cloud providers (AWS, GCP) at runtime. Ansible uses inventory to know WHERE to run playbooks.
Sign in free to practice the full question bank with daily challenges, XP, streaks, duels and a global leaderboard.
Practice the full bank — free →