I was able to make it work: jetty_c: "'{\"components\":\"{{ my_updated_list}}\"}'"
But now iam facing one more issue: i am trying to debug the contents to file but only the last item is getting appended - name: Create Jetty Components set_fact: jetty_c: "'{\"components\":\"{{ my_updated_list }}\"}'" with_items: "{{ JETTY_Record }}" - name: Debug the Jetty Components debug: msg: "{{ jetty_c }}" What am i missing On Wednesday, August 7, 2019 at 10:36:47 AM UTC+5:30, Rakesh Parida wrote: > > i want to have an output as follows: > > '{"components":"my_variable"}' from my playbook. > > - name: Review the Joined List > set_fact: > jetty_c: "{{ '\'{\"\components":"\' + my_joined_list + '"}'' }}" > > Its giving me error. > Can you guys pls help. > > > > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/b5cebf6a-1c7b-4fcf-8674-71358269c54d%40googlegroups.com.