Role Execution Parameters
  • 14 Aug 2023
  • Dark
    Light
  • PDF

Role Execution Parameters

  • Dark
    Light
  • PDF

Article summary

Role Execution Parameters

Automation Gateway clients execute roles on a device using the REST /roles/{role_name}/execute route. The role execution input parameter is a JSON object that contains an array of host strings and an args object that includes a set of key/value pairs that are specific to the role itself. A JSON schema that describes each role's argument parameters is available via the /roles/{role_name} route. Detailed documentation on role endpoints can be found in the API Documentation section of the Automation Gateway UI.

Below is a sample role input parameter for the itential_set_config role.

Sample Role Request Object

{
  "hosts":["eos_host"],
  "args":
  {  
    "transactions": [
      {
        "action": "add",
        "parents": ["interface Management 1"],
        "config_line": "ip address 10.1.2.3/24",
        "id": "anyIDString"
      }
    ]
  },
  "strict_args": true
}

An Ansible role consists of a number of tasks, each of which produces its own results object.

Automation Gateway collects the task results objects and returns them as an array in the order in which they were executed.


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.