Getting the subject mentioned error while reading a compressed json, any workaround for this?
`
- name: read local file
set_fact:
reg_changes: “{{ lookup(‘file’, ‘/home/tess/xl.json’) | from_json }}”
delegate_to: localhost
`
Getting the subject mentioned error while reading a compressed json, any workaround for this?
`
Try using a site like jsonlint.com to check if your xl.json is actually valid JSON.
If it’s compressed, you probably need to uncompress it first. The from_json filter doesn’t have builtin support for decompressing files. (I don’t believe any of our filters do)
-Toshio