Iterate over inventory groups in parallel

Hi,

I’m looking to iterate over inventory groups something like below,

inventory:

[names]
vinod
manoj
suraj

[places]
bangalore
mangalore
mysore

And i’m trying to make a variable to contain as,

variable_dict= “vinod:bangalore manoj:mangalore suraj:mysore”

Searched some of the ansible way of getting above, but much luck.
Any help on this much appreciated.

Thanks,
Vinod

This should give you the beginning of what you need
"{{groups["names"]|product(groups["places"])|map('join',':')|list}}"