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 <-----------