Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: ansible playbooks using j2 template: Module with j2 do not work, after updating "python2-jinja2"to version 2.8-7.fc25 ERROR! Unexpected Exception: The 'jinja2<2.9' distribution was not found and is required by ansible Version-Release number of selected component (if applicable): - ansible: 2.2.1.0 - python2-jinja2: 2.8-7.fc25 How reproducible: - simply yum update F25 to current built (1/30/17), run ansibple playbook using template-module Steps to Reproduce: 1. Install ansible and python-jinja2, latest 2. create ansible playbook using "template:" module 3. run template Actual results: ERROR! Unexpected Exception: The 'jinja2<2.9' distribution was not found and is required by ansible Expected results: running playbook Additional info: rollback of python2-jinja2 to 2.8.1-1.fc25 will resolve issue -> dnf downgrade python2-jinja2 -> playbooks run again.
This report doesn't make much sense to me. The test is for jinja2 less than 2.9, and any 2.8* version will be less than 2.9. Additionally, 2.8.1-1.fc25 is the current one, 2.8-7.fc25 would be a downgrade from that version not the other way around. I cannot duplicate the problem with either version installed. Do you perhaps have another version installed via pip or the like?
Sorry. Like you said: Versions are vice versa. And it still works, when I dnf update the python2-jinja2 back to 2.8.1-1. But I updated some pip packages yesterday: >pip search jnja2 ... Jinja2 (2.9.5) INSTALLED: 2.9.5 (latest) ... So the pip installed version probably overwrote the dnf installed one, until I did the dnf downgrade/upgrade. Thanks, problem solved. Don't mess with two python package managers, you'll end up in dependency hell ;-)
Glad this was not too hard to track down. ;) These kinds of things often are worse. ;) Its like the old saying: Man with one watch always knows what time it is. Man with two watches is never quite sure.