Hi,

I want to write a rulebook that triggers a playbook run on some specific
event. Basically I want to configure an interface of a router. My event
passes all the interface data in the event.payload.data.

The core part of the runbook looks like:

      action:
        run_playbook:
          name: set_interface.yml
          extra_vars:
            interface: "{{ event.payload.data }}"

The rule is triggered and the playbook starts to run. BUT the playbook does
not know which host to target. The output is:

2024-03-06 15:42:52,146 - ansible_rulebook.action.run_playbook - DEBUG -
Calling Ansible runner
[WARNING]: provided hosts list is empty, only localhost is available. Note
that
the implicit localhost does not match 'all'

PLAY [Test playbook]
***********************************************************
skipping: no hosts matched

How can I tell the playbook from the action, which host to target?

Michael.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAFFTi_%2BV4xykLD%3DfSSX6-S4LjHQXzmLKMnQCK2P_fz_P_KkcHw%40mail.gmail.com.

Reply via email to