On Tue, Feb 18, 2020 at 04:39:27AM -0800, Jerome Meyer wrote:
> Hi Team,
> 
> I'm encountered some issue with set_facts from variable with json and for 
> this reason I'm tried to understand this. To reproduce this case I'm using 
> the example from here : playbooks filters 
> <https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#filters-for-formatting-data>
> 
> tasks
>   - shell: cat /some/path/to/file.json 
>     register: result 
> 
>   - set_fact: 
>       myvar: "{{ result.stdout | from_json }}"
> 
> 
> I've created one example.fson file :
> # cat files/example.json
> json_example: |
>   {
>       "example_simple": {
>           "name": "simple",
>           "foo": "value",
>           "item": "this"
>       },
>   }

This is not correct json syntax.
It looks like yaml json_example multiline with an incorrectly syntax json in
it.


-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/20200218154904.ncpnvwf7y4lukkot%40olstad.com.

Reply via email to