Technical Tip: Playbook failed: CS-WF-5: Inappropriate use of Jinja key: 'no filter named 'json_query'
Description
This article describes how to troubleshoot a playbook that fails with the 'CS-WF-5: Inappropriate use of Jinja key: 'no filter named 'json_query'' in Jinja template' error.
The major reason behind this error is that the Ansible Python library is not installed properly which is required to run Jinja filters.
Scope
FortiSOAR.
Solution
- Confirm if having access to https://repo.fortisoar.fortinet.com.
- SSH to the FortiSOAR machine and log in as a 'root' user.\
- Uninstall the current Ansible Package manually:
# sudo -u nginx /opt/cyops-workflow/.env/bin/pip uninstall ansible
# sudo -u nginx /opt/cyops-workflow/.env/bin/pip uninstall ansible-base
- Install Ansible manually using the following command:
# sudo -u nginx /opt/cyops-workflow/.env/bin/pip install ansible --index-url https://repo.fortisoar.fortinet.com
- Restart the 'celeryd' service using the following command:
# systemctl restart celeryd
- Execute the playbook again.
Related article:
