The solution turned out to be simply to use variable bracket notation
instead of dot notation, the value in the brackets can be formed from the
concatenation of a string and a variable
line='<targetHosts>{{ groups.tag_Type_syncgateway | intersect(groups[key_'
+ ec2keyname]) | join(',') }}</targetHosts>'
--
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/ab34d465-b791-4e0a-813f-1a2b8d6de073%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.