> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.itential.com/itential-gateway/5/iagctl/run-service-ansible-playbook/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.itential.com/_mcp/server. # iagctl run service ansible-playbook Run an Ansible playbook service. The `iagctl run service ansible-playbook` command executes an Ansible playbook service and displays the resulting `stdout`, `stderr`, return code, and execution time information. ## Syntax ```bash iagctl run service ansible-playbook [flags] ``` ## Usage notes ### Runtime variables Use the `--set` flag to pass Ansible extra variables at runtime using `key=value` syntax. If you defined a decorator during service creation, Gateway validates all `--set` values against it. ### View accepted inputs Use the `--use` flag with the service name to display information about the inputs a service accepts: ```bash iagctl run service ansible-playbook --use ``` ## Examples ### Run a playbook service ```bash iagctl run service ansible-playbook my-ansible-service ``` ### Run a playbook service with extra variables ```bash iagctl run service ansible-playbook my-ansible-service \ --set interface=0/0/0 ``` ## Options ```bash --profile string Specify the client profile to use (case-insensitive, defaults to [client] section) -h, --help Help for ansible-playbook --set stringArray Runtime input arguments as key=value pairs. Values are validated against the decorator, if one is defined. --use Display usage of the service. ``` ## Options inherited from parent commands ```bash --profile string Specify the client profile to use (case-insensitive, defaults to [client] section) --config string Path to the configuration file --raw Display the result of the command in raw format --verbose Enable verbose output ```