Ansible.legacy.setup failed to execute


I have a playbook which I used to configure servers. I’m passing --limit X.Y.Z.IP --tags=mytag which always worked.

Out of the sudden I get the error msg: The following modules failed to execute: ansible.legacy.setup. I removed the limit, but the error stays the same for each machine.

I also tried to install ansible in a container with no luck at first. Now I’ve found a solution using Ubuntu:20.04 but running in a container is a bit cumbersome. The specific server is Ubunto 18.04. others are CentOS 7

Is there any deprecation I did not find using Google? My client is running Manjaro

Thanks for any help

I expect it is because the servers have old versions of Python that are not supported by the latest versions of Ansible, Ubuntu 18.04 is so old it isn’t listed on the Ubuntu python3 packages page.

Try running python --version and python3 --version on each server and then compare those results with the table here.

1 Like

Sure it was out of support. Thanks for the pointer.

Maybe a hint with a link to the supported OS/Python versions would be helpful in that error message? Hidden behind a shortener to be able to reroute in case the page structure changes

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.