I am looking for a way to automate adding IP addresses to my Ansible host file when new Virtual machines are created instead of manually adding/removing them to the hosts file.

I also want to be able to group the IPs by application and environment. These are Azure VMs.

1 Answer 1


There is a script to accomplish this.

$ ./ansible/contrib/inventory/azure_rm.py --help

Dynamic Inventory Script will help you with this.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .