Skip to content

Commit

Permalink
docs: added a simple rulebook for demo purposes (#211)
Browse files Browse the repository at this point in the history
We need a simple rulebook for Quick Startup guide that does
not connect to the controller. The other rulebook we have requires
a controller.
  • Loading branch information
mkanoor committed Jun 6, 2024
1 parent 1084732 commit db79d23
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions extensions/eda/rulebooks/demo_rulebook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
# This rulebook is for demo purposes only
# Typically the events come from an external source
# and you might have to configure the external source
# and have it generate events on demand.
# In this simple rulebook the events to be generated
# is directly defined in the source definition using
# the ansible.eda.generic source plugin which defines
# a collection of events under the payload key.
#
- name: Simple Rulebook for Demo
hosts: all
sources:
- name: Demo Source
ansible.eda.generic:
payload:
- msg: "Welcome"
- msg: "Adios"
rules:
- name: Say Hello
condition: event.msg == "Welcome"
action:
debug:
msg: "Hello from EDA"
...

0 comments on commit db79d23

Please sign in to comment.