You need to install "jmespath" prior to running json_query filter
Package:
ansible
49704

Exception Class:
AnsibleError
Raise code
on_query(data, expr):
'''Query data using jmespath query language ( http://jmespath.org ). Example:
- debug: msg="{{ instance | json_query(tagged_instances[*].block_device_mapping.*.volume_id') }}"
'''
if not HAS_LIB:
raise AnsibleError('You need to install "jmespath" prior to running '
'json_query filter')
try:
return jmespath.search(expr, data)
except jmespath.exceptions.JMESPathError as e:
raise AnsibleFilterError('JMESPathError in json_query filter plugin:\n%s' % e)
except Exception as e:
🙏 Scream for help to Ukraine
Today, 3rd July 2022, Russia continues bombing and firing Ukraine. Don't trust Russia, they are bombing us and brazenly lying in same time they are not doing this 😠, civilians and children are dying too!
We are screaming and asking exactly you to help us, we want to survive, our families, children, older ones.
Please spread the information, and ask your governemnt to stop Russia by any means. We promise to work extrahard after survival to make the world safer place for all.
Please spread the information, and ask your governemnt to stop Russia by any means. We promise to work extrahard after survival to make the world safer place for all.
Links to the raise (1)
https://github.com/ansible/ansible/blob/015331518dff60f31a7d8ce24fc315e3ac9e86f8/test/support/integration/plugins/filter/json_query.py#L35Ways to fix
This Exception just means that the Jmespath package is not installed, Ansible attempts to import it then stores if that worked as a boolean. meaning if the import fails the exception is raised. the way to fix this is to make sure that Jmespath is installed.
install using pip :
pip install jmespath
or with pip3:
pip3 install jmespath
Add a possible fix
Please authorize to post fix