Skip to main content

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

Secrets

Required secrets:
  • ansible: required values PRIVATE_KEY.

Input fields

string
required
Host to SSH into and run the playbook on
string
required
Host name to use in the inventory
array[object]
required
List of plays to run. Plays run only on the inventory host, so use hosts: all.
string
required
SSH user to connect as
object | null
Environment variables to be used when running AnsibleDefault: null.
array[string] | null
Text that marks the run as failed when raise_on_failure is enabled. The action raises if the playbook output contains any item exactly as written: case-sensitive, and characters like *, . or ^ match themselves (no wildcards or regex). Example: ["FAILED!", "UNREACHABLE!"]. Up to 20 items, each 1-256 characters.Default: null.
object | null
Extra variables to pass to Ansible using -eDefault: null.
array[string] | null
List of events to ignore from the playbook. Returns all events by default.Default: null.
map[string, string] | null
Optional mapping from password prompt to value. Example: {“SSH password:”: ”${{ SECRETS.your_secret_name.some_password }}”}.Default: null.
boolean
Raise an error when the playbook fails, times out, is canceled, or its output contains any error_patterns. Defaults to returning the events.Default: false.
object | null
Additional keyword arguments to pass to the runnerDefault: null.
integer
Timeout for the playbook execution in secondsDefault: 60.