Playbook structure
ansible_playbook_structureParse an Ansible playbook to list plays, hosts, tasks, tags, and parse-time deprecation warnings without executing any plays.
Instructions
Plays, matched hosts, tasks (with module and file:line where unambiguous) and tags of a playbook (ansible-playbook --syntax-check, then --list-hosts --list-tasks --list-tags), plus deprecation warnings Ansible printed while parsing; never runs a play. Parses playbooks with Ansible: treat dir as code you would run --syntax-check on (play-level Jinja and playbook-adjacent vars plugins are evaluated); lookups in play-level fields are refused unless ANSIBLE_MCP_ALLOW_PLAY_LOOKUPS=1.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dir | No | Ansible project directory. Default: ANSIBLE_MCP_DIR, else the server's working directory. | |
| tags | No | Only these tags (--tags) | |
| limit | No | Host pattern (--limit) | |
| playbook | Yes | Playbook path relative to dir | |
| inventory | No | Inventory source relative to dir | |
| max_tasks | No | Max tasks listed (default 300) | |
| skip_tags | No | Skip these tags (--skip-tags) |