Inventory hosts and host vars

Hey All,

I’m currently using the rax.py file to handle my inventory which is working great. But I’ve now hit a problem, the plugin provides the inventory with the public IP of the instance so if i want to create host_vars for it i think i have to refer to it by the IP. I’d really like to refer to a host by a name so that i can re-run playbooks without having to rename my host_var files to work against new IP’s.

Does anyone have any suggestions or alternative approaches on how i might achieve this?

Thanks!

This is currently being taken care of in a refactor of the rax.py inventory script.

See https://github.com/ansible/ansible/pull/4326

Testing would always be welcome, so feel free to pull down that version of rax.py for your use!

Great, thanks for point that out. Will grab it and test it out today!

Chris