Warning in ansible-base 2.10 (when running playbook)

1,454 views
Skip to first unread message

Alex Cernat

unread,
Oct 6, 2020, 1:01:36 PM10/6/20
to Ansible Project

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

Maurice Meyer

unread,
Nov 14, 2020, 8:02:06 AM11/14/20
to Ansible Project
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?

Michael Felt

unread,
Nov 19, 2020, 6:49:45 AM11/19/20
to Ansible Project
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.

Dan Michael O. Heggø

unread,
Dec 14, 2020, 11:16:20 AM12/14/20
to Ansible Project
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

Thank yous

Alex Cernat

unread,
Dec 15, 2020, 3:38:33 AM12/15/20
to Ansible Project
Indeed, that was the problem. When some package has package in its name it's starting to be confusing. Thanks for the solution!

Alex

Reply all
Reply to author
Forward
0 new messages