Skip to content

Instantly share code, notes, and snippets.

@moozer
Created March 24, 2016 19:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moozer/c4060803e1f0677c0212 to your computer and use it in GitHub Desktop.
Save moozer/c4060803e1f0677c0212 to your computer and use it in GitHub Desktop.
- name: handler B
debug: msg="Handler B"
- hosts: all
user: vagrant
tasks:
- name: task to notify handler A (local)
shell: touch nn
notify: handler A
- name: task to notify handler B (from file)
shell: touch nn
notify: handler B
- name: task to notify non-existent handler
shell: touch nn
notify: handler non-exist # I would like an error here
handlers:
- name: handler A
debug: msg="Handler A"
- include: handlersFromFile.yml
- include: nonexist.yml # I would like an error here
@MrMMorris
Copy link

tasks:

  • include: handlers/handlersFromFile.yml
  • name: task to notify handler A (local)
    shell: touch nn
    notify: handler A
  • name: task to notify handler B (from file)
    shell: touch nn
    notify: handler B
  • name: task to notify non-existent handler
    shell: touch nn
    notify: handler non-exist # I would like an error here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment