Why 'reject' filter is not working in ansible

Clash Royale CLAN TAG#URR8PPP
Why 'reject' filter is not working in ansible
I am trying to run the following code in ansible
-debug:
msg: reject('search','2')
here timediff is a list return by jinja2.
But ansible showing
template error while templating string: no filter named 'reject'. String: timediff
this error .
My setting:
ansible = 2.5.5
jinja2 = 2.6
python=2.7.13
how to solve this error .Please help .
1 Answer
1
You are using outdated Jinja2, particularly if you look at the documentation for the reject filter you'll see:
reject
New in version 2.7.
Upgrade.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
thanks for your answer .It's working now.
– mubir
Aug 13 at 6:21