Hello guys
I would like to pass the output of the action run_playbook in a rulebook to another playbook.
This is my rulebook:
---
- name: Listen for selfservice events on a webhook
hosts: all
sources:
- ansible.eda.webhook:
host: 0.0.0.0
port: 5000
rules:
- name: Set maintenance page
condition: events.payload.self_service == "maintenance_page"
actions:
- run_playbook:
name: playbooks/maintenance_page.yml
set_facts: true
post_events: true
json_mode: true
- post_event:
event:
send_notification: true
- name: Send notification
condition: event.send_notification is defined and event.send_notification
actions:
- run_playbook:
name: playbooks/notification.yml
The output of the playbook is written in json, but is it only visible on standard output?
What does the setting “post_events” in the action “run_playbook” do? Can I set the output of the first action in the action “post_event”?
Is there an easier way?
Thanks for any help.
Kind regards
Elmar