Is it possible to limit the vmware_vm_facts module to only return a subset of regex-matched vms?
Big picture: I have a hostname standard that, in part, goes by a sequence # e.g. something-app-prod3a (where 3 is the sequence number). To ensure that all hostnames are unique, I need to check what the highest sequence number is. If there is no match, start at 1, otherwise it is existing_name + 1. So, I need to check for anything leading up to the number for a match, strip off the last letter, get that number and do stuff with it. Maybe there is a better way to accomplish what I need? I can get a list of all vms with vmware_vm_facts, but that takes a loooong time (nearly 6 minutes) and doesn't seem to be necessary. Potentially the right answer is to do this in a separate script, but would rather keep everything ansible-native if possible. -- 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/e67cf217-1670-42c5-80db-10a67c070551%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
