Can i do this in my hosts/inventory file? Also, can i pass a host group in command line -e?
[env1] vm1 ansible_host=vm001 vm2 ansible_host=vm002 [env2] vm1 ansible_host=vm888 vm2 ansible_host=vm999 I want to use the same synonym host name in my playbook (vm1 or vm2 ) but point to different virtual machine depending on what group i specify in the yml file. (hosts: env1) This way i can make the code generic across groups with the same vm1 or vm2. I have duplicate VMs for testing and development. thanks -- 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 [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/40b6b757-00bc-488b-ad9b-fd71b200a126%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
