Why 'reject' filter is not working in ansible

The name of the pictureThe name of the pictureThe name of the pictureClash 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.





thanks for your answer .It's working now.
– mubir
Aug 13 at 6:21






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.

Popular posts from this blog

make 2 or more post in bootsrap

Store custom data using WC_Cart add_to_cart() method in Woocommerce 3

Firebase Auth - with Email and Password - Check user already registered