How do you limit or target a subset of hosts during a run?
⚡
Quick Answer
Use --limit to restrict to specific hosts/groups and --tags to run only tagged tasks.
Detailed Answer
--limit web1.example.com narrows the play to one host for safe testing; patterns and group intersections are supported. --tags config runs only tasks tagged config, and --skip-tags excludes them. Together they let you make small, controlled changes instead of running everything everywhere.
💡
Interview Tip
Show a testing workflow: --limit one host, then widen.
ansiblelimittags