ansible-playbook
Run an Ansible playbook with options for inventory, hosts, check mode, tags, and extra variables to automate infrastructure tasks.
Instructions
Run an Ansible playbook
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"playbook": "<playbook>"
},
"name": "ansible-playbook"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| playbook | Yes | Ansible playbook to run | |
| inventory | No | Path to inventory file | |
| hosts | No | Limit to specific hosts | |
| check | No | Run in check mode (dry-run) | |
| diff | No | Show differences | |
| tags | No | Only run tasks with these tags | |
| skipTags | No | Skip tasks with these tags | |
| extraVars | No | Extra variables to pass | |
| verbose | No | Enable verbose output | |
| become | No | Use sudo/become | |
| timeout | No | Command timeout in seconds |