ansible 2.2.1.0 and Jinja2 2.9.5

HI!

When invoking ansible 2.2.1.0 with Python module Jinja2 2.9.5 installed it fails with:

ERROR! Unexpected Exception: The 'jinja2<2.9' distribution was not found and is required
by ansible

Are there really serious interop issues with Jinja 2.9.x+?

I'm asking because this blocks OS package updates for Jinja.

Ciao, Michael.

Yeah, definitely issues between those two. See some issue reports on
GitHub, for example:

https://github.com/ansible/ansible/issues/20063

Regarads,

Alan Orth wrote:

Yeah, definitely issues between those two. See some issue reports on
GitHub, for example:

https://github.com/ansible/ansible/issues/20063

Any news on that?

The bug above is labeled "affects_2.3" and there's no milestone defined yet.

I'm asking because the Linux distros ship with Jinja2 2.9.x and therefore their ansible
packages won't work.

Personally I'm using a virtualenv for ansible installation because of that. But what's
the general recommendation?

Ciao, Michael.

Hello Michael,

I would always recommend to take the virtualenv approach for non-trivial python software. The same principle is used for e.g. WARs or take a look at docker-compose, they even bundle Python itself. Wasting 30MB disk space is nothing compared to the effort needed to align every Python software on an OS in regards of their dependencies.

Regards
Mirko

Mirko Friedenhagen wrote:

I would always recommend to take the virtualenv approach for non-trivial python
software.

In this particular case it's not a matter of whether to use virtualenv or not or whether
disk space is wasted. The real issue is the need for version pinning which eventually
leads to missing important security updates.

The same principle is used for e.g. WARs or take a look at docker-compose, they even
bundle Python itself. Wasting 30MB disk space is nothing compared to the effort needed
to align every Python software on an OS in regards of their dependencies.

Yes, but same issues with how to install security updates there.

Ciao, Michael.