# How to find Ansibles depenencies?

**URL:** <https://forum.ansible.com/t/how-to-find-ansibles-depenencies/45315>\
**Category:** Get Help\
**Created:** [February 10, 2026, 10:29am UTC](https://forum.ansible.com/t/how-to-find-ansibles-depenencies/45315 "2026-02-10T10:29:20Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![sdettmer](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@sdettmer](https://forum.ansible.com/u/sdettmer)\
**Post date:** [February 10, 2026, 10:29am UTC](https://forum.ansible.com/t/how-to-find-ansibles-depenencies/45315/1 "2026-02-10T10:29:20Z")

</div>

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](https://docs.ansible.com/projects/ansible/latest/reference_appendices/release_and_maintenance.html#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:

```auto
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!

```yaml
- hosts: nodes
  gather_facts: no
  become: true
  tasks:
  - name: Update apt packages
    apt:
      update_cache: yes
      cache_valid_time: 3

```

---

<div class="post-metadata">

**Author:** ![nsavich](https://avatars.discourse-cdn.com/v4/letter/n/d78d45/32.png) [@nsavich](https://forum.ansible.com/u/nsavich)\
**Post date:** [February 10, 2026, 10:39am UTC](https://forum.ansible.com/t/how-to-find-ansibles-depenencies/45315/2 "2026-02-10T10:39:12Z")

</div>

I would use the system python interpreter. So instead of pyenv python, point Ansible to your system python that matches your python3-apt.

---

<div class="post-metadata">

**Author:** ![nsavich](https://avatars.discourse-cdn.com/v4/letter/n/d78d45/32.png) [@nsavich](https://forum.ansible.com/u/nsavich)\
**Post date:** [February 10, 2026, 10:39am UTC](https://forum.ansible.com/t/how-to-find-ansibles-depenencies/45315/3 "2026-02-10T10:39:56Z")

</div>

ansible\_python\_interpreter: /usr/bin/python3

---

<div class="post-metadata">

**Author:** ![sdettmer](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@sdettmer](https://forum.ansible.com/u/sdettmer)\
**Post date:** [February 10, 2026, 10:44am UTC](https://forum.ansible.com/t/how-to-find-ansibles-depenencies/45315/4 "2026-02-10T10:44:27Z")

</div>

Hi,

thank you for your quick reply.

> [@nsavich](#):
>
> I would use the system python interpreter. So instead of pyenv python, point Ansible to your system python that matches your python3-apt.

As I wrote, this does not work, since my Ansible needs an old Python, so I try to provide one - and now need to also provide additional dependencies, which I do not know yet.

---

<div class="post-metadata">

**Author:** ![mkrizek](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/mkrizek/32/2055_2.png) [@mkrizek](https://forum.ansible.com/u/mkrizek)\
**Post date:** [February 10, 2026, 11:54am UTC](https://forum.ansible.com/t/how-to-find-ansibles-depenencies/45315/5 "2026-02-10T11:54:36Z")

</div>

> tl;dr: How to find (list) ansibles dependecies?

You can find the list of requirements for each plugin in their documentation, for the `apt` module it’s [ansible.builtin.apt module – Manages apt-packages — Ansible Community Documentation](https://docs.ansible.com/projects/ansible/latest/collections/ansible/builtin/apt_module.html#requirements)

> 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` ).

Unfortunately the apt module depends on the apt Python bindings that are only available for the system Python which you have to use in order to run the `apt` module. The same case applies to e.g. the `dnf` module. Fortunately this is being worked on, see [Ansible supported Python version on \_target\_ - #17 by Thulium-Drake](https://forum.ansible.com/t/ansible-supported-python-version-on-target/44863/17).

> As I wrote, this does not work, since my Ansible needs an old Python

As @nsavich already said, there’s no other way than to set `ansible_python_interpreter` to the system Python that has the `apt` bindings in order to use the module. I am curious what is the system Python version that your ansible-core version doesn’t support?

Another alternative is to `pip install` different ansible-core version that satisfy your environment.

---

<div class="post-metadata">

**Author:** ![sdettmer](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@sdettmer](https://forum.ansible.com/u/sdettmer)\
**Post date:** [February 10, 2026, 1:03pm UTC](https://forum.ansible.com/t/how-to-find-ansibles-depenencies/45315/6 "2026-02-10T13:03:49Z")

</div>

> You can find the list of requirements for each plugin in their documentation

Ahh, thank you. builtin.apt is a plugin?  
The docs say:

Thank you for your quick, helpful and detailed reply!

> _This module is part of `ansible-core` and included in all Ansible installations… `ansible.builtin.apt` …_

I always thought there are builtins at one hand and plugins at the other.

However, since it is core and it is needing python3-apt, this means core needs python3-apt - and so “ansible-core support matrix” should mention this dependency, shouldn’t it?

How to I find what other plugins I accidentally use?

> Unfortunately the apt module depends on the apt Python bindings that are only available for the system Python which you have to use in order to run the `apt` module

Yes, I’ve read that. Interestingly, it seems hard to built it from source. So I think this won’t be my best option. If it is just apt, I can rewrite to shell commands I think. But after reading the link you shared (thank you), I’m afraid my issue is bigger; Ansible evolved a lot since I started using it and I may need to look for alternatives that are more portable (surely for the price of less functionality) or have a “ansible farm”, for example several containers sharing the scripts.

Isn’t having several Linux nodes in different versions a common use case? How to address this? Maybe there is some tutorial giving me a starting point?

> Another alternative is to `pip install` different ansible-core version that satisfy your environment.

Yes, maybe there is a core version that supports my control node python version as well as **all my target node versions** _for the moment_, and I could install it - but then my script probably will not work anymore… Also, I’m afraid this will break in future when there will be no single Ansible version supporting all my targets (which possibly already is the case, for certain reasons I have multiple control nodes at the moment and actually planned to join them, which would not work out I think).

When having several Linux nodes in different versions, how to address this? Maybe there is some tutorial giving me a starting point?

---

<div class="post-metadata">

**Author:** ![felixfontein](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/felixfontein/32/7530_2.png) [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Post date:** [February 10, 2026, 5:46pm UTC](https://forum.ansible.com/t/how-to-find-ansibles-depenencies/45315/7 "2026-02-10T17:46:19Z")

</div>

Right now you need to use an old enough ansible-core version to be able to install packages on older Debian/Ubuntu systems (same for Rocky/Alma/CentOS/RHEL/…) This will hopefully change in the future, see [CfgMgmtCamp 2026 discussion (1/12): Supported Python versions, or: supporting older Operating Systems](https://forum.ansible.com/t/45288), but it will likely take some time until that’s the case.

---

<div class="post-metadata">

**Author:** ![sdettmer](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@sdettmer](https://forum.ansible.com/u/sdettmer)\
**Post date:** [February 10, 2026, 7:06pm UTC](https://forum.ansible.com/t/how-to-find-ansibles-depenencies/45315/8 "2026-02-10T19:06:38Z")

</div>

> Right now you need to use an old enough ansible-core version to be able to install packages

Do you think apt could be my only issue? I think this I could easily replace by command: “apt -y install” (actually had this in the past).

How are you operating Ansible? I think I should have several versions in parallel. Would `schroot` help? I consider containers, but usually I manage containers with Ansible 🙂

---

<div class="post-metadata">

**Author:** ![felixfontein](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/felixfontein/32/7530_2.png) [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Post date:** [February 10, 2026, 8:53pm UTC](https://forum.ansible.com/t/how-to-find-ansibles-depenencies/45315/9 "2026-02-10T20:53:56Z")

</div>

I’m currently in the situation that I only have to manage systems that have a new enough system Python with ansible. (Though there is at least one Rocky 8 system I’d _like_ to manage partially with ansible as well, but currently can’t because I’m always sticking to the latest ansible release.)

The easiest way forward is to pick one version of ansible-core that supports all system Python’s you have on your targets - if a single version exists that supports all of them. (The support matrix is very useful for determining this.)

---

<div class="post-metadata">

**Author:** ![sdettmer](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@sdettmer](https://forum.ansible.com/u/sdettmer)\
**Post date:** [February 11, 2026, 9:42am UTC](https://forum.ansible.com/t/how-to-find-ansibles-depenencies/45315/10 "2026-02-11T09:42:27Z")

</div>

Thank you for your input, yes, I was looking at this.

_If only apt (and possibly dnf) is the big problem, I can use pyenv + python\_interpreter via inventory to use a common python and shell based apt. But this is empirical and thus a risk - maybe tomorrow I find a scirpt that fails somewhere else. Such issues can quickly take hours which may not be available in all cases._

> The support matrix is very useful for determining this.

I’m afraid, unfortunately it is not. It claims it would list core dependencies and the depenecies look small, but things like “ansible.builtin.apt” are not builtin core functionalities but technically are plugins with own dependencies:  
**each needed builtin plugin need to be checked as well**.

This is a bit unfortunate, I had choosen Ansible mostly because it had no big requirements on target nodes, but apparently this changed over the years.

_Which at first may suprise people, I asked in my team and everybody said it is surprising, most assumed “builtin” and “plugin” are mutually exclusive : a package is either built‑in OR it is a plugin. But here they are both._

To get the dependencies, someone additionally needs to iterate all builtin plugins, look up each dependencies and then see what is availble. So far I did not really manage what node needs which ansible script (because I falsely assumed, buildin will always work, and I didn’t pay attention to depenencies nor documented it sooo well).

Well, and so I asked here if there is a better way than manually checking each script for each used builtin plugin and look it up.

_(I have also certain specialized linuxes, like heavily down-stripped, specialized Devuan VMs that start within 12 seconds or so - the downstrip could remove things that are used by Ansible scripts. Currently I deploy using image replacements without Ansible, but I like to have Ansible available in case I need quick global updates)_

---

<div class="post-metadata">

**Author:** ![shertel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/shertel/32/1241_2.png) [@shertel](https://forum.ansible.com/u/shertel)\
**Post date:** [February 11, 2026, 2:17pm UTC](https://forum.ansible.com/t/how-to-find-ansibles-depenencies/45315/11 "2026-02-11T14:17:20Z")

</div>

I think the word “plugin” is misunderstood. A plugin is anything listed and loaded by the [PluginLoader](https://github.com/ansible/ansible/blob/v2.20.2/lib/ansible/plugins/loader.py#L290). Everything in ansible.builtin is a plugin. It does not mean it is not part of core.

---

<div class="post-metadata">

**Author:** ![felixfontein](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/felixfontein/32/7530_2.png) [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Post date:** [February 11, 2026, 5:09pm UTC](https://forum.ansible.com/t/how-to-find-ansibles-depenencies/45315/12 "2026-02-11T17:09:34Z")

</div>

This use of “plugin” isn’t specific to Ansible btw, I’ve also seen other programs having builtin plugins and some that can be separately installed.

> [@sdettmer](#):
>
> > The support matrix is very useful for determining this.
> 
> I’m afraid, unfortunately it is not. It claims it would list core dependencies and the depenecies look small, but things like “ansible.builtin.apt” are not builtin core functionalities but technically are plugins with own dependencies:  
> **each needed builtin plugin need to be checked as well**.

You should have quoted the “this” part I wrote: finding an ansible-core version that **supports the system Python**. The system Python version depends on the operating system, and if you write down all OSes you want to support and their system Python versions, the matrix is the best thing you have to figure out which ansible-core version covers them all (or if there is none which can - versions newer than the latest one listed as supported might also work fine, just older ones usually don’t).

Figuring out dependencies for plugins is something totally unrelated to figuring out an ansible-core version that is compatible with system Python interpreters of OSes. And obviously (as you wrote) that can’t be done with that matrix (and the matrix is also not intended for that).

> This is a bit unfortunate, I had choosen Ansible mostly because it had no big requirements on target nodes, but apparently this changed over the years.

I think that the builtin plugins still have the same requirements they had 5 or even 10 years ago (with maybe very few exceptions). The apt and dnf/yum plugins always required the Python bindings of the respective package managers. Also the apt module automatically installs the bindings if they aren’t available ([ansible.builtin.apt module – Manages apt-packages — Ansible Community Documentation](https://docs.ansible.com/projects/ansible/devel/collections/ansible/builtin/apt_module.html#parameter-auto_install_module_deps) - the configuration was only added in 2.19, the module was simply always doing that before).

What did change over time is the set of supported Python versions on the target node.

---

<div class="post-metadata">

**Author:** ![sdettmer](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@sdettmer](https://forum.ansible.com/u/sdettmer)\
**Post date:** [February 12, 2026, 12:09pm UTC](https://forum.ansible.com/t/how-to-find-ansibles-depenencies/45315/13 "2026-02-12T12:09:58Z")

</div>

Hi,

thank you both for your reply and information!

> I think the word “plugin” is misunderstood.  
> Everything in ansible.builtin is a plugin. It does not mean it is not part of core.

Yes, I misunderstood it, because I assumed the common usage of “plugin” (see e.g.  
[Wikipedia Plug-in](https://en.wikipedia.org/wiki/Plug-in_(computing)).

> Everything in ansible.builtin is a plugin. It does not mean it is not part of core.

Yes, I see. So in short, buildin.plugins are core.

> finding an ansible-core version that **supports the system Python**

This is not sufficient.

I installed an older Python to my target system, one supported according to the support matrix.  
However, there are builtin.plugins that have additional requirements. Since builtin.plugins are core, the support matrix is incorrect:

Core requires more than the system phyton. For example it requires pyhton-apt (which does not belong to python, even if the name suggests otherwise, and because of that it cannot be installed easily). These requirements are not listed in the core support matrix, so the support matrix suggests a way more portable approach that what actually is possible (because it is easy to provide older Python versions, but hard for some other requirements, so in total it looks easy but is hard).

> I think that the builtin plugins still have the same requirements they had 5 or even 10 years ago

5 years ago I could manage my (then new) nodes.  
To manage my new nodes today, I need newer Ansible.  
Newer Ansible cannot manage my 5 years old nodes anymore.  
New Ansible cannot manage anymore, because the old nodes do not meet the requirements anymore.  
This proves that the requirements did if fact change.  
(which is normal, things evolve over time)

> What did change over time is the set of supported Python versions on the target node.

If the “set of supported Python versions” changed, then obviously the core and thus its included builtin.plugins do NOT have “the same requirements”, but a different set of supported versions.

Anyway, I still have no good approach how to solve my setup in the best way. I don’t know the exact requirements, so I don’t know how to ensure to meet them. I can met core matrix requiments (Python version), but I need more.

I may possibly should setup multiple containers with different ansible versions for the different supported systems, sharing the same scripts, and somehow limit the used functionality to a portable subset (as surely plugins won’t always work with very old YAML syntax, as things evolve, and I could not upgrade the scripts, if they are shared across old and new; at least I had to make several changes to my scripts when updating in the past). Anyway.

Given that there was no suggestion for a common setup, probably my situation is too exotic, too specific, as of course usually supporting old systems means to keep them up-to-date 🙂  
possibly I cannot share all scripts so I should consider a better structure of these.

---

<div class="post-metadata">

**Author:** ![felixfontein](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/felixfontein/32/7530_2.png) [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Post date:** [February 12, 2026, 6:47pm UTC](https://forum.ansible.com/t/how-to-find-ansibles-depenencies/45315/14 "2026-02-12T18:47:53Z")

</div>

If a ansible-core version supports your system Python version(s), then it can use python3-apt (or python-apt for old enough ansible-core versions that still support Python 2). That was always the requirement for using ansible-core (and before ansible-base and Ansible) with a Debian/Ubuntu version, and didn’t change.

(python-apt/python3-apt is only available for the system Python version(s). Thus if you have a Python on your target that doesn’t have python(3)-apt, then it’s **not** a system Python.)

---

<div class="post-metadata">

**Author:** ![shertel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/shertel/32/1241_2.png) [@shertel](https://forum.ansible.com/u/shertel)\
**Post date:** [February 13, 2026, 8:29pm UTC](https://forum.ansible.com/t/how-to-find-ansibles-depenencies/45315/15 "2026-02-13T20:29:44Z")

</div>

> So in short, buildin.plugins are core.

Just an optional part of core.

> I don’t know the exact requirements, so I don’t know how to ensure to meet them.

To determine target node requirements, you’d need to look at the documentation for each module you use. You can find the documentation for each module [here](https://docs.ansible.com/projects/ansible/latest/collections/ansible/builtin/#modules).
