Interview Prep/Ansible/Rapid-Fire Commands

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.

All Ansible questions Roadmap: Ansible

More on Rapid-Fire Commands