run service 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 service ansible-playbook <service-name> [flags]

Examples

Simple Example

Run a simple Ansible playbook service called my-ansible-service

>_ torero run service 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 service 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 playbook when executed. Arguments
                          are appended to the extra-vars already defined on the service at creation. If a
                          decorator is defined, the inputs must match when is defined in the decorator. If
                          a decorator is not defined you may pass in any arguments. The entered arguments
                          must follow a key=value syntax.
      --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