I get the feeling I’m missing something obvious - so feel free to tell me so
I seem to often want to do a combination of two lists - most often one that is static and one that is dependent on the group.
One example:
I have a set of apache vhosts. So - I have a variable that has a list of dicts - one per host. From that - I can create the htdocs dirs, log dirs, the apache config files etc etc. This works fine.
For apache I create the following directory structure per vhost:
/srv/www/[fqdn]
/srv/www/[fqdn]/htdocs
/srv/www/[fqdn]/logs
But - I also want to apply a standard set of extended attributes (using acl) on the [fqdn], htdocs and logs dirs. So - for the standard set of acl’s I want to set - I have second (static) items list.
I can’t see how to apply each of the second list for each of the items in the first list.
Another example is managing a given list of four files for each of a set of given directories - the files list is a static list, the directories varies group to group.
So - I was looking for something similar to with_together - but that doesn’t seem quite what I’m after.
If I give with_together two lists like [a,b,c] and [1,2,3] I observe that I get [a,1], [b,2] and [c,3].
What I’m after is [a,1], [a,2], [a,3], [b,1], [b,2], [b,3], [c,1], [c,2] and [c,3]
What’s the best way to approach this?
Regards
Chris