# How to debug why a role is not played?

**URL:** <https://forum.ansible.com/t/how-to-debug-why-a-role-is-not-played/29510>\
**Category:** Ansible Project\
**Created:** [January 23, 2019, 9:43pm UTC](https://forum.ansible.com/t/how-to-debug-why-a-role-is-not-played/29510 "2019-01-23T21:43:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kumu](https://avatars.discourse-cdn.com/v4/letter/k/f07891/32.png) [@Kumu](https://forum.ansible.com/u/Kumu)\
**Post date:** [January 23, 2019, 9:43pm UTC](https://forum.ansible.com/t/how-to-debug-why-a-role-is-not-played/29510/1 "2019-01-23T21:43:21Z")

</div>

Hi,

I have a playbook with **one play** that runs **several roles**.

But when I run the playbook, Ansible is **skipping** one of the roles (not the first or last, but one in the middle).  
I tried creating a playbook with just that role, and again it’s skipped.  
The play has a “pre\_tasks” section and those are run.

i.e.,

`

- hosts: servers  
become: true  
gather\_facts: false  
pre\_tasks:
- name: Install python-simplejson  
raw: sudo apt-get -y install python-simplejson  
roles:
- the\_role  
`

I’ve tried running Ansible with -vvv but it did not tell me why the role was skipped.

Thanks for any help.

---

<div class="post-metadata">

**Author:** ![Karl\_Auer](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@Karl\_Auer](https://forum.ansible.com/u/Karl_Auer)\
**Post date:** [January 23, 2019, 11:10pm UTC](https://forum.ansible.com/t/how-to-debug-why-a-role-is-not-played/29510/2 "2019-01-23T23:10:37Z")

</div>

Probably need the actual playbook and actual role to see why this is happening.

Is the role tagged, if so how? Though if it were tags you’d expect to see output even when skipped.

Maybe make sure that you are running the playbook you think you are running, and check that the role that is being skipped is definitely being referenced by the playbook. Check things like the roles\_path. And check that the contents of the role are not commented out or something silly.

Also, check that the output you expect from this role is the output it will actually create - maybe you are looking for something that the role is not actually doing!

Regards, K.
