> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tracecat.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Ansible

> Reference for the Tracecat Ansible integration: registered actions, required secrets, expected inputs, and example workflow usage.

## Run Ansible playbook

Action ID: `tools.ansible.run_playbook`

Run Ansible playbook on a single host given a list of plays in JSON format. Supports SSH host-connection mode only.

Reference: [https://docs.ansible.com/ansible/latest/index.html](https://docs.ansible.com/ansible/latest/index.html)

### Secrets

Required secrets:

* `ansible`: required values `PRIVATE_KEY`.

### Input fields

<ParamField path="host" type="string" required>
  Host to SSH into and run the playbook on
</ParamField>

<ParamField path="host_name" type="string" required>
  Host name to use in the inventory
</ParamField>

<ParamField path="playbook" type="array[object]" required>
  List of plays to run
</ParamField>

<ParamField path="user" type="string" required>
  SSH user to connect as
</ParamField>

<ParamField path="envvars" type="object | null">
  Environment variables to be used when running Ansible

  Default: `null`.
</ParamField>

<ParamField path="extravars" type="object | null">
  Extra variables to pass to Ansible using `-e`

  Default: `null`.
</ParamField>

<ParamField path="ignore_events" type="array[string] | null">
  List of events to ignore from the playbook. Returns all events by default.

  Default: `null`.
</ParamField>

<ParamField path="passwords" type="map[string, string] | null">
  Optional mapping from password prompt to value. Example: \{"SSH password:": "\$\{\{ SECRETS.your\_secret\_name.some\_password }}"}.

  Default: `null`.
</ParamField>

<ParamField path="runner_kwargs" type="object | null">
  Additional keyword arguments to pass to the runner

  Default: `null`.
</ParamField>

<ParamField path="timeout" type="integer">
  Timeout for the playbook execution in seconds

  Default: `60`.
</ParamField>
