I intend to Ansible to run deployment configuration on a number of Dell ESXi hosts in VMware using VMware and OpenManage modules.
In my past ansible training, my playbooks have always run from hosts that I have defined in an inventory file. The machines I wish to configure don't have ansible installed so they will be managed from the localhost node. My question is, what is the best practice in running configuration tasks on these machines that aren't actual hosts within ansible? Currently, I am thinking of creating a csv file which will contain the host information, then loop through each host and run my tasks to run on each host using read_csv. pseudo: - name: Read csv and send to task csv_read: csvname.csv task: - taskname passvar: - csv.hostname ____ - name : Run task loop: name in csv.hostnames do: something To me this seems like I am under-engineering the solution a bit. Is there a better way I can do this? Would I be able to add the list of hosts that I want to configure to an inventory file, then reference a group for which I will run my configurations on? E.g. inventory [management] 10.0.0.1 10.0.0.2 [database] 10.1.0.1 10.1.0.2 __ - name: Set DNS on hosts vmware_module: hostname: '{{ management group }}' dns: 1.2.3.4 Thanks for taking the time. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/2c702252-eae3-461e-842f-989e80d88537%40googlegroups.com.