ansible all --list-hosts

Category: IaC & Automation

ansible all --list-hosts

Show which hosts a pattern would match

Prints the hosts the given pattern selects without running any module, perfect for checking a pattern or inventory before acting. Safe to run on any setup. Related: ansible-inventory --graph.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.