Combining objects and subelements
Theansible.builtin.subelementsfilter produces a product of an object and the subelement values of that object, similar to theansible.builtin.subelementslookup. This lets you specify individual subelements to use in a template. For example, this expression:
Data before applying theansible.builtin.subelementsfilter:
Data after applying theansible.builtin.subelementsfilter:
You can use the transformed data withloopto iterate over the same subelement for multiple objects: