diff --git a/extensions/eda/rulebooks/demo_rulebook.yml b/extensions/eda/rulebooks/demo_rulebook.yml new file mode 100644 index 00000000..dc76eb30 --- /dev/null +++ b/extensions/eda/rulebooks/demo_rulebook.yml @@ -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" +...