Re: [ansible-project] Convert list to string in rendered Jinja template

2020-03-06 Thread Shifa Shaikh
Thank you @Stefan, That solves the issue !! On Friday, March 6, 2020 at 2:32:07 PM UTC+5:30, Stefan Hornburg (Racke) wrote: > > On 3/6/20 9:04 AM, Shifa Shaikh wrote: > > I have a variable files like below: > > > > | > > layers: > > -name:APP > > things: > > -cactus

Re: [ansible-project] Convert list to string in rendered Jinja template

2020-03-06 Thread Stefan Hornburg (Racke)
On 3/6/20 9:04 AM, Shifa Shaikh wrote: > I have a variable files like below: > > | >   layers: >     -name:APP >       things: >         -cactus >         -lotus >         -jasmine >         -rose >       bgcolor: >         -sky blue > > >     -name:WAS >       things: >         -mango >        

Re: [ansible-project] Convert list to string in rendered Jinja template

2020-03-06 Thread Mark Whaite
Hi You can find all about Jinja filters here https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html But you can convert a list to a string using {{ list | join(" ") }} This will add a space between each element. I am not sure if that is what you need. On Fri, 6 Mar 2020

[ansible-project] Convert list to string in rendered Jinja template

2020-03-06 Thread Shifa Shaikh
I have a variable files like below: layers: - name: APP things: - cactus - lotus - jasmine - rose bgcolor: - sky blue - name: WAS things: - mango - apple bgcolor: - yellow Below is my jinja