mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 05:12:45 +00:00
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:
committed by
Brian Coca
parent
b5414088a3
commit
7a56e5d45d
20
test/integration/targets/sensu_handler/tasks/pipe.yml
Normal file
20
test/integration/targets/sensu_handler/tasks/pipe.yml
Normal 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
|
||||
Reference in New Issue
Block a user