# How to use copy with with\_items and a 'sub list' (not sure if that is the right terminology)

**URL:** <https://forum.ansible.com/t/how-to-use-copy-with-with-items-and-a-sub-list-not-sure-if-that-is-the-right-terminology/36657>\
**Category:** Ansible Project\
**Created:** [May 24, 2022, 7:16pm UTC](https://forum.ansible.com/t/how-to-use-copy-with-with-items-and-a-sub-list-not-sure-if-that-is-the-right-terminology/36657 "2022-05-24T19:16:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![morgan\_cox](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@morgan\_cox](https://forum.ansible.com/u/morgan_cox)\
**Post date:** [May 24, 2022, 7:16pm UTC](https://forum.ansible.com/t/how-to-use-copy-with-with-items-and-a-sub-list-not-sure-if-that-is-the-right-terminology/36657/1 "2022-05-24T19:16:46Z")

</div>

Hi.

Having an issue with a seemingly simple task, I just cannot work this out, pretty sure there is a simple way of doing this …

I have these example vars for a role

---

<div class="post-metadata">

**Author:** ![morgan\_cox](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@morgan\_cox](https://forum.ansible.com/u/morgan_cox)\
**Post date:** [May 25, 2022, 11:47am UTC](https://forum.ansible.com/t/how-to-use-copy-with-with-items-and-a-sub-list-not-sure-if-that-is-the-right-terminology/36657/2 "2022-05-25T11:47:42Z")

</div>

I worked it out …

vars :-
