# When i run my playbook then below error happens

**URL:** <https://forum.ansible.com/t/when-i-run-my-playbook-then-below-error-happens/39037>\
**Category:** Get Help\
**Created:** [December 11, 2024, 7:01am UTC](https://forum.ansible.com/t/when-i-run-my-playbook-then-below-error-happens/39037 "2024-12-11T07:01:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ravindrakal](https://avatars.discourse-cdn.com/v4/letter/r/a5b964/32.png) [@ravindrakal](https://forum.ansible.com/u/ravindrakal)\
**Post date:** [December 11, 2024, 7:01am UTC](https://forum.ansible.com/t/when-i-run-my-playbook-then-below-error-happens/39037/1 "2024-12-11T07:01:28Z")

</div>

[Gathering facts]  
fatal [localhost]: FAILED! =\>(“ansible\_facts”: {}, “changed”: false, “failed\_modules”: {“ansible.legacy.setup”:…

“msg”: “MODULE FAILURE\n see stdout/stderr for the exact error”, “rc”:1} }, “msg”: “The following modules failed to execute: ansible.legacy.setup\n”}

---

<div class="post-metadata">

**Author:** ![bcoca](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/bcoca/32/9269_2.png) [@bcoca](https://forum.ansible.com/u/bcoca)\
**Post date:** [December 11, 2024, 5:20pm UTC](https://forum.ansible.com/t/when-i-run-my-playbook-then-below-error-happens/39037/2 "2024-12-11T17:20:50Z")

</div>

try posting the full error and info when running with `-vvv`

---

<div class="post-metadata">

**Author:** ![jrglynn2](https://avatars.discourse-cdn.com/v4/letter/j/94ad74/32.png) [@jrglynn2](https://forum.ansible.com/u/jrglynn2)\
**Post date:** [December 11, 2024, 7:56pm UTC](https://forum.ansible.com/t/when-i-run-my-playbook-then-below-error-happens/39037/3 "2024-12-11T19:56:15Z")

</div>

Also I recommend adding more detail to the title, maybe mention module and/or error - people tend to respond to things when they can see quickly that they can help

---

<div class="post-metadata">

**Author:** ![anon81884396](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@anon81884396](https://forum.ansible.com/u/anon81884396)\
**Post date:** [December 11, 2024, 8:38pm UTC](https://forum.ansible.com/t/when-i-run-my-playbook-then-below-error-happens/39037/4 "2024-12-11T20:38:01Z")

</div>

> [@ravindrakal](#):
>
> The following modules failed to execute: ansible.legacy.setup

Googling your error yielded [Ansible.legacy.setup failed to execute](https://forum.ansible.com/t/ansible-legacy-setup-failed-to-execute/6347) so it may also be worth posting information about the target’s OS version and what version of Python is running there, as well as your version of Ansible on top of what the other people have asked for in this thread.
