# skipped role, register and with\_items causing headaches

**URL:** <https://forum.ansible.com/t/skipped-role-register-and-with-items-causing-headaches/23081>\
**Category:** Ansible Project\
**Created:** [November 23, 2016, 1:22am UTC](https://forum.ansible.com/t/skipped-role-register-and-with-items-causing-headaches/23081 "2016-11-23T01:22:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paul\_Baker](https://avatars.discourse-cdn.com/v4/letter/p/90db22/32.png) [@Paul\_Baker](https://forum.ansible.com/u/Paul_Baker)\
**Post date:** [November 23, 2016, 1:22am UTC](https://forum.ansible.com/t/skipped-role-register-and-with-items-causing-headaches/23081/1 "2016-11-23T01:22:26Z")

</div>

Hi All,

It seems like issues along these lines have been raised as bugs and closed several times… see [https://github.com/ansible/ansible/issues/17500](https://github.com/ansible/ansible/issues/17500)

I have created a role, which I intend to skip under certain circumstances. When the role is skipped, all tasks still run… OK… I don’t understand why this is desired behavior but that’s beside the point. I have ended up needing to put some very nasty looking “|default()” filters inside of my “with\_items” clauses to get the playbook to run. Without the default values I end up with errors like ‘dict object’ has no attribute ‘stdout\_lines’

Any other suggestions? I guess I can have different playbooks for different roles rather than skipping roles that I don’t want to use, but it seems a little cumbersome.

Thanks,  
Paul

`
