Summary
Run a role from a collection in Automation Gateway
Description
This method will run a role from a collection in Automation Gateway
Route
No Northbound API Available
Roles
admin
Parameters
DetailsExampleSchema
| Name |
Type |
Required |
Description |
| collectionName |
string |
yes |
the name of the collection containing the role to run |
| roleName |
string |
yes |
the name of the role to run |
| hosts |
array |
no |
an array of hosts to run the role on |
| groups |
array |
no |
an array of group names. The Ansible collection role will be executed against each device group passed in the groups array. |
| args |
object |
yes |
an object containing the arguments to pass into the role |
| template |
string |
no |
the textfsm string used by the role |
Copied to Clipboard
{
"collectionName": "marmorag.ansodium",
"roleName": "ansodium",
"hosts": [
"xr9kv-atl",
"xr9kv-atl",
"xr9kv-atl",
"xr9kv-atl",
"xr9kv-atl"
],
"groups": [
"group1",
"group1",
"group1",
"group1"
],
"template": "tamplate"
}
Copied to Clipboard
{
"type": "object",
"properties": {
"collectionName": {
"type": "string",
"examples": [
"marmorag.ansodium"
]
},
"roleName": {
"type": "string",
"examples": [
"ansodium"
]
},
"hosts": {
"type": "array",
"items": {
"type": "string",
"title": "host",
"$ref": "deviceData#/definitions/deviceName"
}
},
"groups": {
"type": "array",
"items": {
"type": "string",
"$ref": "deviceData#/definitions/groupName"
}
},
"args": {
"type": "object",
"properties": {},
"examples": [
{}
]
},
"template": {
"type": "string",
"examples": [
"tamplate"
]
}
},
"required": [
"collectionName",
"roleName",
"args"
],
"additionalProperties": false
}
Return
DetailsExampleSchema
| Name |
Type |
Description |
| result |
object |
the status of running the role on each host |
Copied to Clipboard
{
"response": true
}
Copied to Clipboard
{
"type": "object",
"properties": {
"response": {
"type": "boolean"
}
}
}