Warning in ansible-base 2.10 (when running playbook)

Debian 10.6 up-to-date, ansible-base 2.10.2 (for ubuntu bionic) installed as package.

Every module that implies a redirection (not from ansible.builtin) seems to trigger that warning.
I.e: community.general, community.crypto, ansible.posix, community.mysql.
Actually the correct statement is: every role which uses modules other than ansible.builtin generates that warning, even all modules are specified as CFQN (full name).

[debug with -vvvv]

redirecting (type: modules) ansible.builtin.sysctl to ansible.posix.sysctl
Loading collection ansible.posix from /usr/share/ansible/collections/ansible_collections/ansible/posix
[WARNING]: packaging Python module unavailable; unable to validate collection Ansible version requirements

But all playbooks are executing OK as far as I can tell.

The developers are saying it’s an user problem, so how can I find what’s missing and get rid of that warning ?

Thank you

I’m running into the same problem and can’t find any resources on what this effectively means and how I can solve it.

Any pointers?

Your specific message - about package management - is setup-tools and/or wheel installed. Guessing, but I have had very similar messages when wheel is missing.

The warning tells you that you don’t have the Python package called “packaging” installed locally. This is a direct dependency of ansible-base, so under normal circumstances it should be installed when you install ansible.

If you’re using poetry, however, it will not install automatically at the moment, due to the way the dependencies are declared. I just submitted an issue about that: https://github.com/ansible/ansible/issues/72967

As a workaround, you have to add it manually: poetry add packaging

Dan Michael

Indeed, that was the problem. When some package has package in its name it’s starting to be confusing. Thanks for the solution!

Alex

Pe luni, 14 decembrie 2020, la 18:16:20 UTC+2, danmi...@gmail.com a scris: