---
- name: Delayed comparison
hosts: all
sources:
- ansible.eda.webhook:
host: 0.0.0.0
port: 5050 # use 5050 as on Mac OSX the 5000 is already reserved by default OS
rules:
- name: r1
condition:
all:
- event.request.type == "Delete"
- event.friend_list.names is select("search", events.m_0.request.friend_name)
action:
print_event:
pretty: true
but I get
ansible_rulebook.exception.ConditionParsingException: Error parsing: event.friend_list.names is select("search", events.m_0.request.friend_name). Expected end of text, found '(' (at char 33), (line:1, col:34)
run with ansible-rulebook --rulebook example.yml --verbose
Actual results
ansible_rulebook.exception.ConditionParsingException: Error parsing: event.friend_list.names is select("search", events.m_0.request.friend_name). Expected end of text, found '(' (at char 33), (line:1, col:34)
Expected results
not an error 🙃 since it's copied from the docs
Additional information
I'm possibly doing something wrong, hope these details help to ultimately triage if there is some bugs or it's my fault (in that case sorry I raised this)
Please confirm the following
Bug Summary
I'm trying a variation of this snippet example from the doc:
https://github.com/ansible/ansible-rulebook/blob/34d60eb61aa78b41ca2fc20f1174089399896fde/docs/conditions.rst?plain=1#L246-L253
Accounting for https://github.com/ansible/ansible-rulebook/pull/493 Using
webhook
instead ofgeneric
source (see also https://github.com/ansible/ansible-rulebook/issues/494)So the example I'm trying in full reads as:
but I get
Environment
Steps to reproduce
example.yml
ansible-rulebook --rulebook example.yml --verbose
Actual results
Expected results
not an error 🙃 since it's copied from the docs
Additional information
I'm possibly doing something wrong, hope these details help to ultimately triage if there is some bugs or it's my fault (in that case sorry I raised this)