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

host
string
required
Host to SSH into and run the playbook on
host_name
string
required
Host name to use in the inventory
playbook
array[object]
required
List of plays to run
user
string
required
SSH user to connect as
envvars
object | null
Environment variables to be used when running AnsibleDefault: null.
extravars
object | null
Extra variables to pass to Ansible using -eDefault: null.
ignore_events
array[string] | null
List of events to ignore from the playbook. Returns all events by default.Default: null.
passwords
map[string, string] | null
Optional mapping from password prompt to value. Example: {“SSH password:”: ”${{ SECRETS.your_secret_name.some_password }}”}.Default: null.
runner_kwargs
object | null
Additional keyword arguments to pass to the runnerDefault: null.
timeout
integer
Timeout for the playbook execution in secondsDefault: 60.