# Error message when running playbook

**URL:** <https://forum.ansible.com/t/error-message-when-running-playbook/41859>\
**Category:** Get Help\
**Created:** [April 22, 2025, 1:34am UTC](https://forum.ansible.com/t/error-message-when-running-playbook/41859 "2025-04-22T01:34:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mdiehl](https://avatars.discourse-cdn.com/v4/letter/m/f6c823/32.png) [@mdiehl](https://forum.ansible.com/u/mdiehl)\
**Post date:** [April 22, 2025, 1:34am UTC](https://forum.ansible.com/t/error-message-when-running-playbook/41859/1 "2025-04-22T01:34:52Z")

</div>

I’m in the process of rebuilding my main workstation, and as part of that rebuild, I would like to run one of my playbooks.

However, when I do, I get this error message:

```auto
TASK [Gathering Facts] ************************************************************************************************************************************************
fatal: [mikelaptop]: FAILED! => {"ansible_facts": {}, "changed": false, "failed_modules": {"ansible.legacy.setup": {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python3"}, "failed": true, "module_stderr": "Shared connection to 192.168.1.11 closed.\r\n", "module_stdout": "\r\nTraceback (most recent call last):\r\n File \"/home/mdiehl/.ansible/tmp/ansible-tmp-1745284382.6440313-1854975-177535314737957/AnsiballZ_setup.py\", line 102, in <module>\r\n _ansiballz_main()\r\n File \"/home/mdiehl/.ansible/tmp/ansible-tmp-1745284382.6440313-1854975-177535314737957/AnsiballZ_setup.py\", line 94, in _ansiballz_main\r\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n File \"/home/mdiehl/.ansible/tmp/ansible-tmp-1745284382.6440313-1854975-177535314737957/AnsiballZ_setup.py\", line 37, in invoke_module\r\n from ansible.module_utils import basic\r\n File \"/tmp/ansible_ansible.legacy.setup_payload_v6ehjd8k/ansible_ansible.legacy.setup_payload.zip/ansible/module_utils/basic.py\", line 176, in <module>\r\nModuleNotFoundError: No module named 'ansible.module_utils.six.moves'\r\n", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}}, "msg": "The following modules failed to execute: ansible.legacy.setup\n"}
``

Note that the laptop in question is new as well. (Not ideal, I know.)

Here is one of many playbooks that I need to run, but return the error message from above:

``$ cat users.yml 
- name: Create and setup user accounts
  hosts: home
  vars_files:
    - ./Vars/Users.yml

  tasks:
  - name: Create users
    ansible.builtin.user:
      name: "{{ item.name }}"
      generate_ssh_key: yes
      state: present
      groups:
        - games
        - sudo
    loop: "{{ Users }}
``
This was all working before I had to recover from backup, so I don't know where to begin to troubleshoot this.

Mike
```

---

<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:** [April 22, 2025, 8:29am UTC](https://forum.ansible.com/t/error-message-when-running-playbook/41859/2 "2025-04-22T08:29:49Z")

</div>

> [@mdiehl](#):
>
> `No module named 'ansible.module_utils.six.moves'`

It looks to be an issue with your Ansible version?

> <https://unix.stackexchange.com/questions/776844/ansible-error-no-module-named-ansible-module-utils-six-moves/776845#776845>

There is also [this comment](https://github.com/ansible/ansible/issues/11141#issuecomment-108199698), from a decade ago… that suggests:

```bash
pip install six

```

---

<div class="post-metadata">

**Author:** ![shertel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/shertel/32/1241_2.png) [@shertel](https://forum.ansible.com/u/shertel)\
**Post date:** [April 23, 2025, 9:05pm UTC](https://forum.ansible.com/t/error-message-when-running-playbook/41859/3 "2025-04-23T21:05:40Z")

</div>

It looks like a broken install. Check if you’re using a version of ansible-core that supports the Python version on the control node: [Releases and maintenance — Ansible Community Documentation](https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#ansible-core-support-matrix). Run the playbook with `-vv` to check the intended version of Python is executing ansible-playbook (it will be at the top of the output) in case there are multiple Python versions installed.

---

<div class="post-metadata">

**Author:** ![mdiehl](https://avatars.discourse-cdn.com/v4/letter/m/f6c823/32.png) [@mdiehl](https://forum.ansible.com/u/mdiehl)\
**Post date:** [April 24, 2025, 6:04pm UTC](https://forum.ansible.com/t/error-message-when-running-playbook/41859/4 "2025-04-24T18:04:54Z")

</div>

I ended up blowing the system away and starting over. It was a new install, so I didn’t lose anything.

After that, it worked as expected.

Thanks for your time.

Mike.

---

<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:** [May 24, 2025, 6:05pm UTC](https://forum.ansible.com/t/error-message-when-running-playbook/41859/5 "2025-05-24T18:05:50Z")

</div>

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