Hi,
tl;dr: How to find (list) ansibles dependecies? For example, it needs python3-apt (which seems to be a very specific package, that cannot be installed manually) - but what else?
detailed:
I looked to the ansible-core support matrix and learned that my target python must be an old one. I used pyenv to install python 3.9 on managed node, that same I have on the control node, and configured it as interpreter. I start with a simple apt update (see at the end) but end up with:
TASK [Update apt packages] ************************************************************************************************************************************************************************************
[WARNING]: Updating cache and auto-installing missing dependency: python3-apt
fatal: [c3-999]: FAILED! => {"changed": false, "msg": "Could not import python modules: apt, apt_pkg. Please install python3-apt package."}
Now apparently python3-apt can neither be installed via pip, nor the system one can be used (of course it is installed globally using apt install python3-apt).
I also try the python3.11 using apt install python3.11 (and set the ansible_python_interpreter=/usr/bin/python3.11), but get the same error.
Let me assume I somehow solve that, possibly with help of the community here :), or rewriting using shell commands. Then I’m afraid that I just get stuck at the next unmeet dependency.
Is there a list of dependencies I need to fullfil in order to use the ansible-2.10.7+merged+base+2.10.8+dfsg-1 that came with Debian 11 / bullseye?
Also, I manage some nodes that have no original Debian linuxes.
Any pointers appreciated!
- hosts: nodes
gather_facts: no
become: true
tasks:
- name: Update apt packages
apt:
update_cache: yes
cache_valid_time: 3