do-ansible-inventory
Tool by DigitalOcean

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.

Usage

To use do-ansible-inventory, run:

do-ansible-inventory

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:

  • All of your Droplets as Ansible hosts
  • Each DigitalOcean region as an Ansible group containing any Droplets in that region
  • Each Droplet tag as a group containing any Droplets with that tag

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.

Installation and Other Instructions

Please see the project’s GitHub page for detailed instructions on how to install and use it.

by: Kamal Nasser May 27, 2020 Visit Site Ansible
You rated this helpful.
You reported this tool.
Was this helpful?
Report an issue

0 Comments