Silent pass of missing handler on notify

18 views
Skip to first unread message

Patrick Glomski

unread,
Mar 10, 2016, 10:33:53 AM3/10/16
to Ansible Project
With ansible 2.0.1.0, If I call missing handlers / handlers that are not defined, they are silently ignored. Is that expected behavior? If so, is there any way to check existence and force a failure when a handler I declare doesn't exist? I can't think of many situations where I'd like it to just keep running and claim success.

- debug: msg="expected behavior to not fail?"
  changed_when: true
  notify:
    - nonexistent_handler
 
TASK [debug] *******************************************************************
task path: /data/tst.yml:44
NOTIFIED HANDLER nonexistent_handler
ok: [testbox] => {
    "msg": "expected behavior to not fail?"
}

PLAY RECAP *********************************************************************
testbox                     : ok=2    changed=1    unreachable=0    failed=0  

Thanks,
Patrick
Reply all
Reply to author
Forward
0 new messages