UpCloudLtd/upcloud-ansible

Allow using `ip_address` as identifier for `upcloud_firewall` directive

Closed this issue · 3 comments

Hey!

We would need to automate firewall changes to multiple Upcloud servers but our ansible inventory files only contain the server IP-addresses. Currently only hostname or uuid can be used as a identifier in the upcloud_firewall module.

We could save plenty of manual labour If we could use those IP-addresses as unique identifiers for the machines where we would want to alter the firewalls.

I will create a PR soon using the /ip_address/ endpoint found from your documentation: https://www.upcloud.com/static/downloads/upcloud-apidoc-1.2.1.pdf#page=69

This needs few small changes to the https://github.com/UpCloudLtd/upcloud-python-api code too.

Hey! Thank you for the PRs. I'll be merging them today and making sure they fit the codebases :)

Would it be more coherent to close this issue after this feature is implemented :)?

At least I have a bad habit of forgetting what I'm doing but maybe It's just me.
Thanks in advance!

don't worry, about a thing, 'cause every little PR, they have been merged.