My ansible script looks like,
- name: get dataset id
set_fact :
dataset_ID: "{{ABC.json.datasets | json_query(query) | map('split', '/') | map(attribute=5) | list | first}}"
vars:
query: "[?displayName == 'My_dataset'].name"
it gives me this error
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: jinja2.exceptions.TemplateRuntimeError: no filter named 'split'
fatal: [localhost]: FAILED! => changed=false
Not sure what's happening here. I mean the script was working fine before and when I ran this in new VM it throws this error. Any idea regrading this?