I’m developing an Ansible module to manage Floating IPs, (that can be) assigned to a droplet from a pool of “gates”. My problem is when I run the playbook again how can I know if there is already any Floating IP assigned to one of the droplets in that pool? Tags only support “droplets” type, at least is what is documented https://developers.digitalocean.com/documentation/v2/#tag-a-resource
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
The only method currently supported by the API for checking whether there exists a floating IP assigned to a given droplet is to iterate over all floating IPs in the account (which won’t take long; normal accounts can only have three floating IPs at once) and see if the droplet field on any of them equals the droplet in question.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.