Skip to content

Commit

Permalink
Added a demo rulebook with webhooks (#247)
Browse files Browse the repository at this point in the history
For the Simplified Event Routing we need a small
demo rulebook that has a webhook source that can be used
for demonstration purposes.
  • Loading branch information
mkanoor authored Aug 13, 2024
1 parent 3a75a16 commit 960a3da
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions extensions/eda/rulebooks/demo_webhook_rulebook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
# This rulebook is for demo purposes only
# This webhook listens on port 5555 by default,
# you can override it by passing in an variable
# called port. If you have other webhook sources
# running on the default port 5555 you might see
# port conflicts.
# It logs every event received so it should work
# with any vendors payload.
# It doesn't use authentication to keep things simple
#
- name: Webhook demo prints all incoming events
hosts: all
sources:
- ansible.eda.webhook:
port: "{{ port | default(5555) }}"
host: 0.0.0.0
rules:
- name: Webhook rule
condition: true
action:
print_event:
pretty: true
...

0 comments on commit 960a3da

Please sign in to comment.