I don&#x27;t understand this.<p>If you need to iterate over the items you can just use &quot;with_items&quot; or &quot;with_subelements&quot; (<a href="http:&#x2F;&#x2F;docs.ansible.com&#x2F;ansible&#x2F;playbooks_loops.html#looping-over-subelements" rel="nofollow">http:&#x2F;&#x2F;docs.ansible.com&#x2F;ansible&#x2F;playbooks_loops.html#looping...</a>) and the &quot;{{ item }}_12345&quot;<p>If you need a list for a template you can always loop it in the template and access the sublements there and template them as you wish.<p>One of the strong points of Ansible is that it can be read very easily. The moment you do:<p>&quot;{{ important_files | map(attribute=&#x27;file_name&#x27;) | list | map(&#x27;regex_replace&#x27;,&#x27;(.*)&#x27;,&#x27;\\1_{{ file_suffix }}&#x27;) | list }}&quot;<p>you throw it away.