On 07.08.2019 08:23, Rakesh Parida wrote:
> 
> The value of my "my_joined_list"
> is : idp:25.0.1,das:25.0.0
> 
> Now i want my o/p to be as follows:
> '{"components":"idp:25.0.1,das:25.0.0"}'
> 
> Error is as below
> ERROR! Syntax Error while loading YAML.
>    found unknown escape character
> 
> The error appears to be in
> '/root/raka-tests/raka-cac-components-parsing.yml': line 145, column 29,
> but may
> be elsewhere in the file depending on the exact syntax problem.
> 
> The offending line appears to be:
> 
>        set_fact:
>          jetty_c:  "{{ '\'{\"\components":"\' + my_joined_list }}"
>                              ^ here

This should work

  jetty_c: '{{ {"components": my_joined_list} }}'


-- 
Kai Stian Olstad

-- 
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/8ea0be34-c1c0-9b53-ee0f-fa4e31603d00%40olstad.com.

Reply via email to