ansible-role
Execute an Ansible role on target hosts, with support for inventory files, become/sudo, extra variables, check mode, and verbose output.
Instructions
Run an Ansible role
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": {
"role": "<role>"
},
"name": "ansible-role"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| role | Yes | Ansible role to run | |
| hosts | No | Target hosts | localhost |
| inventory | No | Path to inventory file | |
| become | No | Use sudo/become | |
| extraVars | No | Extra variables | |
| check | No | Run in check mode | |
| verbose | No | Enable verbose output |