# Ansible.legacy.setup failed to execute

**URL:** <https://forum.ansible.com/t/ansible-legacy-setup-failed-to-execute/6347>\
**Category:** Get Help\
**Tags:** ansible-core\
**Created:** [June 13, 2024, 12:22pm UTC](https://forum.ansible.com/t/ansible-legacy-setup-failed-to-execute/6347 "2024-06-13T12:22:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sascha\_Andres](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sascha_andres/32/3742_2.png) [@Sascha\_Andres](https://forum.ansible.com/u/Sascha_Andres)\
**Post date:** [June 13, 2024, 12:22pm UTC](https://forum.ansible.com/t/ansible-legacy-setup-failed-to-execute/6347/1 "2024-06-13T12:22:51Z")

</div>

Hello,

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

---

<div class="post-metadata">

**Author:** ![chris](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/chris/32/293_2.png) [@chris](https://forum.ansible.com/u/chris)\
**Post date:** [June 13, 2024, 12:42pm UTC](https://forum.ansible.com/t/ansible-legacy-setup-failed-to-execute/6347/2 "2024-06-13T12:42:50Z")

</div>

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](https://packages.ubuntu.com/focal/python3).

Try running `python --version` and `python3 --version` on each server and then compare those results with [the table here](https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#ansible-core-target-node-python-support).

---

<div class="post-metadata">

**Author:** ![Sascha\_Andres](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sascha_andres/32/3742_2.png) [@Sascha\_Andres](https://forum.ansible.com/u/Sascha_Andres)\
**Post date:** [June 19, 2024, 7:35am UTC](https://forum.ansible.com/t/ansible-legacy-setup-failed-to-execute/6347/3 "2024-06-19T07:35:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [July 19, 2024, 7:35am UTC](https://forum.ansible.com/t/ansible-legacy-setup-failed-to-execute/6347/4 "2024-07-19T07:35:29Z")

</div>

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