Public bug reported:

Description:    Ubuntu 20.04.1 LTS
Release:        20.04

ansible:
  Installed: 2.9.6+dfsg-1
  Candidate: 2.9.6+dfsg-1
  Version table:
 *** 2.9.6+dfsg-1 500
        500 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
        500 http://us.archive.ubuntu.com/ubuntu focal/universe i386 Packages
        100 /var/lib/dpkg/status

If you install the ansible package, it will install Python 3 as its
dependencies. However, the ansible-playbook command imports the Python
2.7 jinja2 module and will fail with the following exception.

Traceback (most recent call last):
  File "/usr/local/bin/ansible-playbook", line 67, in <module>
    import ansible.constants as C
  File "/usr/local/lib/python2.7/dist-packages/ansible/constants.py", line 11, 
in <module>
    from jinja2 import Template
ImportError: No module named jinja2

The workaround is to explicitly install the python-jinja2 package.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: ansible 2.9.6+dfsg-1
ProcVersionSignature: Ubuntu 5.4.0-56.62-generic 5.4.73
Uname: Linux 5.4.0-56-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.13
Architecture: amd64
CasperMD5CheckResult: skip
Date: Tue Dec  8 12:21:41 2020
PackageArchitecture: all
ProcEnviron:
 TERM=screen
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: ansible
UpgradeStatus: Upgraded to focal on 2020-11-30 (7 days ago)

** Affects: ansible (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug focal

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1907287

Title:
  ansible-playbook imports Python 2.7 jinja2

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ansible/+bug/1907287/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to