I realised today that there was a much easier way of doing this than my custom filter of 2 years ago, see the following gist
Recently on #ansible in IRC, a person queried how to modify all items in a list. The actual requirement had to do with having users [Alice, Bob, Carol], and needing to pass conf file names to another role in the form [Alice.conf, Bob.conf, Carol.conf].
I found that by default, it’s not as easy as you might think.
In the end I created a simple custom filter