# Pass output of action run\_playbook in rulebook to another action

**URL:** <https://forum.ansible.com/t/pass-output-of-action-run-playbook-in-rulebook-to-another-action/5949>\
**Category:** Get Help\
**Tags:** ansible-rulebook\
**Created:** [May 23, 2024, 9:28am UTC](https://forum.ansible.com/t/pass-output-of-action-run-playbook-in-rulebook-to-another-action/5949 "2024-05-23T09:28:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![evonlanthen](https://avatars.discourse-cdn.com/v4/letter/e/f07891/32.png) [@evonlanthen](https://forum.ansible.com/u/evonlanthen)\
**Post date:** [May 23, 2024, 9:28am UTC](https://forum.ansible.com/t/pass-output-of-action-run-playbook-in-rulebook-to-another-action/5949/1 "2024-05-23T09:28:17Z")

</div>

Hello guys

I would like to pass the output of the action run\_playbook in a rulebook to another playbook.

This is my rulebook:

```auto
---
- 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

---

<div class="post-metadata">

**Author:** ![mgcanlife](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@mgcanlife](https://forum.ansible.com/u/mgcanlife)\
**Post date:** [February 28, 2026, 7:53am UTC](https://forum.ansible.com/t/pass-output-of-action-run-playbook-in-rulebook-to-another-action/5949/2 "2026-02-28T07:53:56Z")

</div>

I’m wondering the exact same thing. Was this ever solved?
