# "one of the following is required: name,list while executing handlers"

**URL:** <https://forum.ansible.com/t/one-of-the-following-is-required-name-list-while-executing-handlers/25220>\
**Category:** Ansible Project\
**Created:** [August 10, 2017, 10:49am UTC](https://forum.ansible.com/t/one-of-the-following-is-required-name-list-while-executing-handlers/25220 "2017-08-10T10:49:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sameer\_Modak](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sameer_modak/32/5180_2.png) [@Sameer\_Modak](https://forum.ansible.com/u/Sameer_Modak)\
**Post date:** [August 10, 2017, 10:49am UTC](https://forum.ansible.com/t/one-of-the-following-is-required-name-list-while-executing-handlers/25220/1 "2017-08-10T10:49:09Z")

</div>

We are getting “one of the following is required: name,list” error on executing handlers on non sles servers

skipping: [NESSTDDB01] =\> (item=ntp)  
skipping: [NESSTDDB01] =\> (item=vim)  
failed: [NESLTR10AJAWA01] (item=vim) =\> {“failed”: true, “item”: “vim”, “msg”: “one of the following is required: name,list”}  
failed: [neslds12ainfo01] (item=vim) =\> {“failed”: true, “item”: “vim”, “msg”: “one of the following is required: name,list”}  
failed: [NESLTR10AJAWA01] (item=ntp) =\> {“failed”: true, “item”: “ntp”, “msg”: “one of the following is required: name,list”}  
failed: [neslds12ainfo01] (item=ntp) =\> {“failed”: true, “item”: “ntp”, “msg”: “one of the following is required: name,list”}

Below are the tasks and handlers main.yml file

This is tasks main.yml  
vi roles/basic/tasks/main.yml

- name: “Installing VIM and NTP”  
yum: name= {{ item }} state=present  
with\_items:
- vim
- ntp  
when: ansible\_distribution != “SLES”  
notify:
- test \<-----------

---

<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:** [August 10, 2017, 5:31pm UTC](https://forum.ansible.com/t/one-of-the-following-is-required-name-list-while-executing-handlers/25220/2 "2017-08-10T17:31:52Z")

</div>

You can't have space in front or after the equal sign.  
So correct syntax  
&nbsp;&nbsp;&nbsp;yum: name={{ item }} state=present

---

<div class="post-metadata">

**Author:** ![Sameer\_Modak](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sameer_modak/32/5180_2.png) [@Sameer\_Modak](https://forum.ansible.com/u/Sameer_Modak)\
**Post date:** [August 13, 2017, 12:09pm UTC](https://forum.ansible.com/t/one-of-the-following-is-required-name-list-while-executing-handlers/25220/3 "2017-08-13T12:09:41Z")

</div>

Thanks Kai let for htis
