do-ansible-inventory is a tool to generate Ansible inventories of DigitalOcean Droplets
do-ansible-inventory is a tool that generates an Ansible inventory file with your DigitalOcean Droplets. It is an alternative to dynamic inventories as you can run do-ansible-inventory once and receive a static inventory file that you can use anywhere, copy, or modify.
To use do-ansible-inventory, run:
By default, without setting any options, do-ansible-inventory will attempt to look up the currently configured doctl access token and generate an ansible inventory with:
If you do not have
doctl installed or would like to explicitly specify the access token, run
do-ansible-inventory --access-token ACCESS_TOKEN or use the
DIGITALOCEAN_ACCESS_TOKEN environment variable.
The resulting inventory will be printed to the console. You can save it to a file instead by passing
--out inventory or redirecting the output like so:
do-ansible-inventory > inventory.
Please see the project’s GitHub page for detailed instructions on how to install and use it.
Have you created an Integration, API Wrapper, Service, or other Tool that helps developers build on DigitalOcean? Help users find it by listing it in Community Tools.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.