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-v0.5.0-py3

2. Register (root user)

cd /usr/local/dbbot/portable-ansible-v0.5.0-py3
sh setup_portable_ansible.sh
source ~/.bashrc

After execution, the root user can directly use the ansible command.

3. Validation

ansible --version
ansible dbbot_mysql -m ping

4. Instructions for non-root users

If an ordinary user also wants to call Ansible, he can repeatedly execute setup_portable_ansible.sh under the corresponding user to let the alias be written into the user’s own shell configuration.

5. Usage suggestions

  • Try to use it in the portable-ansible-v0.5.0-py3 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.