How do you list the tasks and tags a playbook contains?
BeginnerProductionRapid-Fire Commands
Answer
ansible-playbook playbooks/site.yml --list-tasks
ansible-playbook playbooks/site.yml --list-tags
ansible-playbook playbooks/site.yml --tags nginx --list-tasks # what a tag would run
Useful before using --tags or --start-at-task, to confirm the exact task names and what a tag actually selects.
More on Rapid-Fire Commands
How do you see which hosts a playbook would run against, without running it?BeginnerHow do you inspect the inventory structure and a host's variables?BeginnerHow do you restart a service on a group with an ad-hoc command?BeginnerHow do you resume a playbook from a specific task or step through it?BeginnerHow do you re-run a playbook only on the hosts that failed?IntermediateHow do you check the value a variable resolves to on a specific host?Intermediate