Pabawi uses Ansible for ad-hoc command execution, package installation, and playbook execution on managed hosts.
ansibleandansible-playbookinPATHon the Pabawi host- A reachable inventory file for managed hosts
- SSH connectivity from the Pabawi host to target nodes
ansible --version && ansible-playbook --versionANSIBLE_ENABLED=true
ANSIBLE_PROJECT_PATH=/opt/ansible-project # working directory for ansible commands
ANSIBLE_INVENTORY_PATH=inventory/hosts # relative to ANSIBLE_PROJECT_PATH, or absolute
ANSIBLE_EXECUTION_TIMEOUT=300000 # ms, default 5 minUse the Ansible Setup Guide in the Pabawi web UI to generate the .env snippet interactively.
Pabawi uses the configured inventory file for all Ansible operations. Any valid Ansible inventory format works.
INI (inventory/hosts):
[web]
web01.example.com
web02.example.com
[web:vars]
ansible_user=ubuntu
ansible_ssh_private_key_file=~/.ssh/id_rsaYAML (inventory/hosts.yaml):
all:
children:
web:
hosts:
web01.example.com:
web02.example.com:
vars:
ansible_user: ubuntu
ansible_ssh_private_key_file: ~/.ssh/id_rsaPlace playbooks in ANSIBLE_PROJECT_PATH (e.g. playbooks/). They appear in the Run Playbook section on node detail pages.
---
- name: Maintenance playbook
hosts: all
become: true
tasks:
- name: Ensure curl is present
ansible.builtin.package:
name: curl
state: presentTest from the CLI before using the UI:
cd $ANSIBLE_PROJECT_PATH
ansible all -i inventory/hosts -m ping
ansible-playbook -i inventory/hosts playbooks/site.yml --checkThen in Pabawi:
- Check Integrations — Ansible should show
connectedordegraded - Execute a command on a node with tool = Ansible
- Verify executions show
Tool: Ansible
| Problem | Fix |
|---|---|
| "Ansible integration is not available" | ANSIBLE_ENABLED=true not set, or ansible not in PATH. Restart backend after changing .env. |
| "Ansible inventory file was not found" | Check ANSIBLE_PROJECT_PATH + ANSIBLE_INVENTORY_PATH. Use absolute paths. Check file permissions. |
| Commands work in shell but fail in Pabawi | Check SSH_KEY/user in inventory vars. Set LOG_LEVEL=debug and check backend logs. |