I installed ansible-core 2.20.2 yesterday (I’ve been using the version provided with EL9 until now, but needed some uplevel collections to be installed). I’m getting deprecation warnings for ansible.module_utils.common._collections_compat and various ansible.module_utils._*, including _text but I get them without using any external collections that I see. I can’t see anything wrong with the installation of ansible-core which was done using python3-pip-3.13 to ~/.local/bin/ansible. A trivial example using just assert is:
- hosts: localhost
gather_facts: false
tasks:
- assert:
that: true | bool
which gives this result (but only if | bool is included):
[steve@trillian IaC]$ ansible-playbook tmp.yml
PLAY [localhost] **************************************************************************************************************************************************************************
TASK [assert] *****************************************************************************************************************************************************************************
Friday 06 February 2026 18:20:42 +0000 (0:00:00.030) 0:00:00.030 *******
[WARNING]: Deprecation warnings can be disabled by setting `deprecation_warnings=False` in ansible.cfg.
[DEPRECATION WARNING]: The `ansible.module_utils.common._collections_compat` module is deprecated. This feature will be removed from ansible-core version 2.24. Use `collections.abc` from the Python standard library instead.
ok: [localhost] =>
changed: false
msg: All assertions passed
PLAY RECAP ********************************************************************************************************************************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
TASKS RECAP *******************************************************************************************************************************************************************************
Friday 06 February 2026 18:20:43 +0000 (0:00:00.067) 0:00:00.098 *******
===============================================================================
assert ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.07s
[steve@trillian IaC]$
Ansible config:
[steve@trillian IaC]$ ansible --version
ansible [core 2.20.2]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/steve/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/steve/.local/lib/python3.13/site-packages/ansible
ansible collection location = /home/steve/.ansible/collections:/usr/local/share/ansible/collections:/usr/share/ansible/collections
executable location = /home/steve/.local/bin/ansible
python version = 3.13.11 (main, Dec 5 2025, 00:00:00) [GCC 11.5.0 20240719 (Red Hat 11.5.0-11)] (/usr/bin/python3.13)
jinja version = 3.1.6
pyyaml version = 6.0.3 (with libyaml v0.2.5)
[steve@trillian IaC]$
O/S
[steve@trillian IaC]$ cat /etc/redhat-release
AlmaLinux release 9.7 (Moss Jungle Cat)
[steve@trillian IaC]$
Installed collections:
[steve@trillian IaC]$ ansible-galaxy collection list
# /usr/local/share/ansible/collections/ansible_collections
Collection Version
------------------------ -------
ansible.netcommon 8.4.0
ansible.posix 2.1.0
ansible.utils 6.0.1
awx.awx 24.6.1
chocolatey.chocolatey 1.5.3
community.crypto 3.1.0
community.dns 3.5.1
community.docker 5.0.5
community.general 12.3.0
community.libvirt 2.0.0
community.okd 5.0.0
containers.podman 1.19.0
infra.aap_utilities 2.8.0
infra.leapp 1.6.1
kubernetes.core 5.0.0
oxlorg.opnsense 25.7.8
redhat.openshift 4.0.1
# /usr/share/ansible/collections/ansible_collections
Collection Version
------------------------ -------
redhat.rhel_mgmt 1.1.0
redhat.rhel_system_roles 1.108.6
[steve@trillian IaC]$