# Nested dir creation

**URL:** <https://forum.ansible.com/t/nested-dir-creation/35640>\
**Category:** Ansible Developer\
**Created:** [August 19, 2021, 1:23pm UTC](https://forum.ansible.com/t/nested-dir-creation/35640 "2021-08-19T13:23:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Satya\_S](https://avatars.discourse-cdn.com/v4/letter/s/e56c9b/32.png) [@Satya\_S](https://forum.ansible.com/u/Satya_S)\
**Post date:** [August 19, 2021, 1:23pm UTC](https://forum.ansible.com/t/nested-dir-creation/35640/1 "2021-08-19T13:23:39Z")

</div>

Hello All,

I’m trying to the below:

dir\_var: {app1: [name: [a1,a2], dev: [1,2], prod: [11,12]],  
app2: [name: [a3,a4], dev: [11,12], prod: [21.22]]}

env: dev

should create folders like this if env is ‘dev’  
a1  
a1/1  
a1/2  
a2  
a2/1  
a2/2  
a3  
a3/11  
a3/12  
a4  
a4/11  
a4/12

please help.

Thanks
