0Pricing
Ansible Academy · Lesson

Patterns: Targeting all, web & host1

Select exactly which hosts a command hits.

Patterns Pick the Targets

A host pattern is the first argument that decides exactly which inventory hosts an ad-hoc command will run against. 🎯

all Hits Everything

The special pattern all matches every host in your inventory. Use it for fleet-wide checks like a quick ping.

ansible all -m ping

All lessons in this course

  1. Anatomy of the ansible Command
  2. Patterns: Targeting all, web & host1
  3. Run Shell Commands with command & shell
  4. Privilege Escalation with become
← Back to Ansible Academy