# Why Does This Fail

**URL:** <https://forum.ansible.com/t/why-does-this-fail/25741>\
**Category:** Ansible Project\
**Created:** [October 12, 2017, 7:39pm UTC](https://forum.ansible.com/t/why-does-this-fail/25741 "2017-10-12T19:39:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![doug](https://avatars.discourse-cdn.com/v4/letter/d/dbc845/32.png) [@doug](https://forum.ansible.com/u/doug)\
**Post date:** [October 12, 2017, 7:39pm UTC](https://forum.ansible.com/t/why-does-this-fail/25741/1 "2017-10-12T19:39:08Z")

</div>

**Top-level nodes.yml:**

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [October 12, 2017, 7:56pm UTC](https://forum.ansible.com/t/why-does-this-fail/25741/2 "2017-10-12T19:56:07Z")

</div>

> \*Top-level nodes.yml:\*
> 
> ---  
> - hosts: "{{ hosts }}"  
> &nbsp;&nbsp;roles:  
> &nbsp;&nbsp;&nbsp;&nbsp;- { role: lsssd, when: inventory\_hostname not in (groups['edisonnodes']|union(groups['pugnodes\_old'])) }  
> &nbsp;&nbsp;&nbsp;&nbsp;- nodes  
> &nbsp;&nbsp;&nbsp;user: root  
> &nbsp;&nbsp;&nbsp;gather\_facts: True

\<snip /\>

> I have tried various changes but nothing seems to work.

Have you tried

roles:  
&nbsp;&nbsp;&nbsp;- role: lsssd  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;when: inventory\_hostname not in (groups['edisonnodes']|union(groups['pugnodes\_old']))
