Thank you very much, Brian and Mark. I have been using the with_items approach and providing the VM names from a static file. Since we use Ansible Tower, these files are fetched from a git repository. We also use the roles way of doing things and being relatively new to Ansible, I am little confused about how to go ahead here.
I believe in your cases, you define the hostnames in the hosts file saved inside the Ansible Server or a common location. I was trying to figure out how do I achieve the same thing in my case where the hostnames are in the git repository i.e., how do I specify that in the ansible.cfg file?
Can you suggest the best approach here - saving the hostnames inside the Ansible server Vs. fetching that from a Git repository during the job run?
In my case