The query/q function
This function is shorthand forlookup(...,wantlist=True). These are equivalent:
For more details and a list of lookup plugins in ansible-core, seeWorking with plugins. You may also find lookup plugins in collections. You can review a list of lookup plugins installed on your control machine with the commandansible-doc-l-tlookup.