Add sensu_handler Ansible module

This provides a sensu_handler module in order to be able to dynamically
configure a Sensu handler.
This commit is contained in:
David Moreau-Simard
2017-08-01 23:10:32 -04:00
committed by Brian Coca
parent b5414088a3
commit 7a56e5d45d
8 changed files with 631 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
# Note: Pipe handlers are also tested and used as part of basic main.yml coverage
- name: Configuring a handler with missing pipe parameters should fail
sensu_handler:
name: "pipe"
type: "pipe"
register: failure
ignore_errors: true
- name: Assert that configuring a handler with missing pipe parameters fails
assert:
that:
- failure | failed
- "'the following are missing: command' in failure['msg']"
- name: Configure a handler with pipe parameters
sensu_handler:
name: "pipe"
type: "pipe"
command: "/bin/bash"
register: handler