EasyEnv
Engineering/Courses/Catalog/Ansible/Inventory and Ad Hoc Commands
Ansible
IntermediateLesson 2 of 1225 min · hands-on

Inventory and Ad Hoc Commands

Part of the Ansible course

You now know Ansible connects to machines over SSH and describes desired state instead of steps. But before Ansible can talk to anything, it needs an address book: a list of the machines you want it to manage, and some way to group them so you can say "all the web servers" instead of naming each one by hand.

Once an inventory exists, you do not have to jump straight to a full playbook to get value out of Ansible. You can fire off a single command against every host in the inventory, or just one group of them, and see the result immediately. Those one-off commands are called ad hoc commands, and they are how most people spend their first hour with Ansible: poking at machines, checking things, running quick fixes, before...

Want to learn Ansible Inventory and Ad Hoc Commands in a real environment?

Click below, get a fresh Linux box with Ansible ready to go, and work through Inventory and Ad Hoc Commands hands-on with an AI tutor that knows your code.

Start this lessonInventory and Ad Hoc Commands

What you'll learn

  • Inventory file
  • Host groups
  • Ad hoc commands
  • Ansible ping
  • Ansible -m
  • Ansible -a

Read this lesson in your language

All lessons in this course

12 lessons
  1. 1What Is Ansible20 min
  2. 2Inventory and Ad Hoc Commands25 min
  3. 3Your First Playbook30 min
  4. 4Tasks, Modules, and Handlers30 min
  5. 5Variables and Facts30 min
  6. 6Templates with Jinja230 min
  7. 7Loops and Conditionals30 min
  8. 8Roles and Galaxy35 min
  9. 9Vault and Secrets25 min
  10. 10Tags and Debugging25 min
  11. 11Collections and Plugins25 min
  12. 12Capstone: Multi Host Deploy60 min

Explore other courses

Inventory and Ad Hoc Commands - Ansible (English) | Engineering Courses