0

I'm trying to use podman containers modules on my ansible 2.9.18 version but got an error.

Command to install: ansible-galaxy collection install containers.podman

Error message: "msg": "Could not find imported module support code for common. Looked for either LooseVersion.py or version.py"

Could you help me ?

  • `... on my ansible 2.9.18 ...`. Prior to anything, upgrade to a supported version (at least 2.11). `pip install ansible` (which is the officially supported install method) will get you the latest one. – Zeitounator Oct 26 '22 at 15:57
  • It's a lot of work to upgrade to 2.11 because we have a lot of playbook dev in 2.9 – user20340761 Oct 27 '22 at 08:26
  • 2.9 is deprecated and unmaintained for over 2 years now, it's about time you start reducing that technical debt. Moreover there are very few changes to make (if any actually) to make your playbook compatible. Your ci should tell you this in seconds. It's also very easy to run several versions of ansible in parallel (in different virtualenvs) if you really need. – Zeitounator Oct 27 '22 at 11:27
  • Thank for you message. I manage to upgrade my ansible version. Got a little problem with ansible-vault in some playbook: "message": "ansible-vault requires the cryptography library in order to function" I already have the python3-cryptography package installed – user20340761 Oct 28 '22 at 13:56
  • installed packages: python3-cffi-1.14.5-5.el9.x86_64 AND python3-cryptography-36.0.1-1.el9_0.x86_64 – user20340761 Oct 28 '22 at 14:28
  • `pip install cryptography` – Zeitounator Oct 28 '22 at 15:41
  • Hello, already installed [root:~]# pip install cryptography Requirement already satisfied: cryptography in ./.local/lib/python3.9/site-packages (38.0.1) Requirement already satisfied: cffi>=1.12 in ./.local/lib/python3.9/site-packages (from cryptography) (1.15.1) Requirement already satisfied: pycparser in ./.local/lib/python3.9/site-packages (from cffi>=1.12->cryptography) (2.21) – user20340761 Nov 02 '22 at 13:29
  • `... in ./.local/lib/python3.9/site-packages ...` <= is ansible using that python version? (see `ansible --version`). – Zeitounator Nov 02 '22 at 14:03
  • Yep! [root@:~]# ansible --version ansible [core 2.13.5] config file = /etc/ansible/ansible.cfg configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /root/.local/lib/python3.9/site-packages/ansible ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections executable location = /usr/bin/ansible python version = 3.9.10 (main, Feb 9 2022, 00:00:00) [GCC 11.2.1 20220127 (Red Hat 11.2.1-9)] – user20340761 Nov 02 '22 at 14:18
  • I can't reproduce your issue. – Zeitounator Nov 02 '22 at 14:20
  • Oh wait, important precision: i'm trying to use ansible-vault on an AlmaLinux 9 server. – user20340761 Nov 02 '22 at 15:47
  • Please read [ask] and pay attention to the [mre] section. Good luck. – Zeitounator Nov 02 '22 at 15:52

0 Answers0