# Comment yml file to conf using jinja2 templating

**URL:** <https://forum.ansible.com/t/comment-yml-file-to-conf-using-jinja2-templating/28699>\
**Category:** Ansible Project\
**Created:** [October 1, 2018, 5:44pm UTC](https://forum.ansible.com/t/comment-yml-file-to-conf-using-jinja2-templating/28699 "2018-10-01T17:44:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Saranya\_N](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@Saranya\_N](https://forum.ansible.com/u/Saranya_N)\
**Post date:** [October 1, 2018, 5:44pm UTC](https://forum.ansible.com/t/comment-yml-file-to-conf-using-jinja2-templating/28699/1 "2018-10-01T17:44:00Z")

</div>

I have a yml as a list of dictionary like sample below :

Section1 :  
&nbsp;&nbsp;- { k1 : V1 , K2 : V2 }

Section2 :  
&nbsp;&nbsp;- { k1 : V1 , K2 : V2 , K3 : V3 }

In my yml file the actual section names keeps varying. They're of very different names.

Is there a way to loop through these sections using j2 templating ?

Kindly suggest.
