Quick Guide to the Portable Ansible Package in dbbot

1. Location

The portable Ansible distribution is located by default at:

/usr/local/dbbot/portable-ansible

2. Register (root user)

/usr/local/dbbot/bin/dbbotctl env setup
source ~/.bashrc

After execution, the root user can directly use the ansible command. This writes the following into ~/.bashrc:

  • ansible / ansible-playbook aliases
  • /usr/local/dbbot/bin prepended to PATH

3. Validation

ansible --version
ansible dbbot_mysql -m ping

4. Direct invocation without aliases

If you only want to troubleshoot the portable runtime entrypoint, call the real paths directly instead of relying on shell aliases:

python3 /usr/local/dbbot/portable-ansible/ansible-playbook --version
python3 /usr/local/dbbot/portable-ansible/ansible all -m ping

Additional notes:

  • Public docs default to dbbotctl env setup; normal usage does not require exporting extra environment variables.
  • DBBOT_PORTABLE_ANSIBLE_HOME is an internal shell constant used by dbbotctl, not a public interface users need to manage manually.

5. Instructions for non-root users

If a non-root user also needs Ansible, run dbbotctl env setup under that user as well so the aliases and PATH changes are written into that user’s shell configuration.

6. Usage suggestions

  • Try to use it in the portable-ansible directory to facilitate reuse of the default ansible.cfg and hosts.ini.
  • If you want to run in another directory, please bring the configuration file simultaneously to avoid going to the system default parameters.
  • If you need to inspect the underlying bootstrap behavior, check /usr/local/dbbot/libexec/dbbotctl/setup_portable_ansible.sh.