ngine-io / ansible-collection-cloudstack

CloudStack Ansible Collections
https://galaxy.ansible.com/ngine_io/cloudstack
GNU General Public License v3.0
21 stars 27 forks source link

Add option to use public_ip as hostname in inventory plugin #116

Open martialblog opened 1 year ago

martialblog commented 1 year ago

Hi,

this would add the option to use the public_ip as a hostname in the inventory plugin.

Cheers, Markus

martialblog commented 1 year ago

I wasn't sure on how to write a test for that. I'd be happy to add a test if someone could give me a hint.

rvalle commented 1 year ago

how does this work with IPV6 as it is introduced in ACS 4.17.x?

martialblog commented 1 year ago

I suppose it won't. I specifically named it "v4_public_ip" in order to introduce a v6_public_ip in the future...

rvalle commented 1 year ago

My question is that you are using instance.publicip and reexporting it as v4_public_ip.

In ACS 4.17 with IPV6 is it not possible that an IPV6 is returned as instance.public ip?

Just brainstorming, I have not reviewed the implementation or anything... but perhaps worth double checking...