Skip to main content
Contributor
June 4, 2020

Technical Tip: Playbook failed: CS-WF-5: Inappropriate use of Jinja key: 'no filter named 'json_query'

  • June 4, 2020
  • 0 replies
  • 3270 views

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

 

  1. Confirm if having access to https://repo.fortisoar.fortinet.com.
  2. SSH to the FortiSOAR machine and log in as a 'root' user.\
  3. 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
 
  1. 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  
 
  1. Restart the 'celeryd' service using the following command:
 
# systemctl restart celeryd