# Molecule seems to have changed it's ROLE\_PATH

**URL:** <https://forum.ansible.com/t/molecule-seems-to-have-changed-its-role-path/40639>\
**Category:** Get Help\
**Tags:** molecule\
**Created:** [February 26, 2025, 2:06pm UTC](https://forum.ansible.com/t/molecule-seems-to-have-changed-its-role-path/40639 "2025-02-26T14:06:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thulium-Drake](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/thulium-drake/32/833_2.png) [@Thulium-Drake](https://forum.ansible.com/u/Thulium-Drake)\
**Post date:** [February 26, 2025, 2:06pm UTC](https://forum.ansible.com/t/molecule-seems-to-have-changed-its-role-path/40639/1 "2025-02-26T14:06:09Z")

</div>

Hi folks,

So I ran into this really weird issue today, I was making a new role and for that role I wanted to make some Molecule tests (as we all do, right? 😉 )

Previously, I had this as my `converge.yml`:

```auto
- name: 'Converge'
  hosts: 'all'
  tasks:
    - name: 'Run my role'
      ansible.builtin.include_role:
        name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"

```

And up until Molecule `25.3.1` this works just fine™. But _now_ when I run _the same code_ it errors out with:

```auto

PLAY [Converge] ****************************************************************

TASK [Gathering Facts] *********************************************************
ok: [dante]

TASK [Run role] ****************************************************************
ERROR! the role 'dante_proxy' was not found in /home/ansible/roles/dante_proxy/molecule/default/roles:/home/ansible/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:/home/ansible/roles/dante_proxy/molecule/default

```

The workaround? →

```auto
---
- name: 'Converge'
  hosts: 'all'
  tasks:
  # lint does not like this....
    - name: 'Run role' # noqa role-name[path]
      ansible.builtin.include_role:
        name: "../../../{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"

```

See below:

```auto

PLAY [Converge] ****************************************************************

TASK [Gathering Facts] *********************************************************
ok: [dante]

TASK [Run role] ****************************************************************

TASK [../../../dante_proxy : Ensure packages] **********************************
ok: [dante]

TASK [../../../dante_proxy : Ensure configuration] *****************************
ok: [dante]

TASK [../../../dante_proxy : Ensure service] ***********************************
ok: [dante]

PLAY RECAP *********************************************************************
dante      

```

So I have some questions:

- This hacky workaround is probably not what I should do, what _is_ the correct means of setting the roles path?
- Why did it move in the first place? It was working just fine 😉

---

<div class="post-metadata">

**Author:** ![Thulium-Drake](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/thulium-drake/32/833_2.png) [@Thulium-Drake](https://forum.ansible.com/u/Thulium-Drake)\
**Post date:** [February 26, 2025, 8:29pm UTC](https://forum.ansible.com/t/molecule-seems-to-have-changed-its-role-path/40639/2 "2025-02-26T20:29:15Z")

</div>

Well, it seems I wasn’t the only one surprised 🙂 [molecule test fails in ansible role directory with molecule version 25 · Issue #4391 · ansible/molecule · GitHub](https://github.com/ansible/molecule/issues/4391)
