
Ansible CLI
CertifiedTasks that run Ansible CLI commands to execute playbooks and capture results.
Provide commands (required) and any playbooks or inventories via inputFiles or Namespace Files; tasks run in a container image (default cytopia/ansible:latest-tools) with optional beforeCommands and env to prepare the environment. A default ansible.cfg and callback plugin are injected so playbook outputs, per-task details, and logs (when outputLogFile is true) are returned to Kestra.
Ansible CLI
Tasks that run Ansible CLI commands to execute playbooks and capture results.
Provide commands (required) and any playbooks or inventories via inputFiles or Namespace Files; tasks run in a container image (default cytopia/ansible:latest-tools) with optional beforeCommands and env to prepare the environment. A default ansible.cfg and callback plugin are injected so playbook outputs, per-task details, and logs (when outputLogFile is true) are returned to Kestra.
How to use the Ansible plugin
Run Ansible playbooks and ad-hoc commands from Kestra flows inside a container with the Ansible CLI pre-installed.
Common properties
containerImage defaults to cytopia/ansible: latest-tools. taskRunner controls where the container runs — defaults to Docker. Pass inventory files, playbooks, and other supporting files via inputFiles (inline content) or pull them from namespace files. Target host credentials (SSH keys, passwords) are supplied through the inventory file using standard Ansible inventory variables rather than plugin-level properties.
Tasks
cli.AnsibleCLI runs one or more Ansible CLI commands set in commands (e.g. ansible-playbook site.yml -i inventory.ini). Use beforeCommands to run setup steps before the main commands, env to inject environment variables, and outputFiles to capture files produced during execution. Set ansibleConfig to supply a custom ansible.cfg; if omitted, Kestra generates one automatically with its structured output callback enabled.