Bug 1417711 - latest update of python2-jinja2 (2.8-7.fc25) breaks ansible-playbooks with j2 templates
Summary: latest update of python2-jinja2 (2.8-7.fc25) breaks ansible-playbooks with j2...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: ansible
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Kevin Fenzi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-30 17:47 UTC by Andreas Stolzenberger
Modified: 2017-01-30 20:20 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-01-30 20:20:03 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Andreas Stolzenberger 2017-01-30 17:47:45 UTC
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.

Comment 1 Kevin Fenzi 2017-01-30 18:19:15 UTC
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?

Comment 2 Andreas Stolzenberger 2017-01-30 19:45:29 UTC
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 ;-)

Comment 3 Kevin Fenzi 2017-01-30 20:20:03 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.