run ansible-playbook
Execute an Ansible playbook service
Synopsis
Run
This command will execute an Ansible playbook service and display the playbook's resulting stdout, stderr, return code, as well as some additional execution time information.
Runtime variables typically called extra-vars
by Ansible can be specified using the --set
flag. The --set
flag
takes in a key=value
syntax. Any variables passed in using --set
will be validated against the decorator if one was
defined during the service's creation.
To view helpful information about what inputs are accepted by a particular service, run this command with just the
service name and the --use
flag.
torero run ansible-playbook <service-name> [flags]
Examples
Simple Example
Run a simple Ansible playbook service called my-ansible-service
>_ torero run ansible-playbook my-ansible-service
Setting Arguments
Run an Ansible playbook service called my-ansible-service
that takes in an extra-vars input of interface
>_ torero run ansible-playbook my-ansible-service \
--set interface=0/0/0
Options
-h, --help help for ansible-playbook
--set stringArray Sets an input argument to be passed into the script via the CLI when executed.
Arguments are sent in the order that the are defined here and are appended to
the arguments already defined on the ansible playbook service. They must follow
the key=value syntax and the service must support the inputs.
--use Display the possible inputs of the playbook via the decorator.
Options inherited from parent commands
--config string Path to the configuration file
--raw Displays the result of the command in its raw format
--verbose Enable verbose output
SEE ALSO
- torero run - Run an automation service