I’m trying to clean up a rulebook I put together and am unable to get conditionals to work the way they say they should in the documentation.
I’m using AAP 2.5, and the DE image is the stock ansible-automation-platform-25/de-supported-rhel9:latest
This image contains ansible-rulebook 1.1.3
This works:
- name: "Run job template for webhook"
condition: event.payload.changes is select("regex", ".") and event.payload.eventKey != "pr:merged" and event.payload.actor.name != "xxxxxxxxxxxxx"
action:
run_job_template:
name: "my_job_template"
< . . . >
The below conditional split up into an array does NOT work, though the documentation suggests that it should:
- name: "Run job template for webhook"
condition:
all:
- event.payload.changes is select("regex", ".")
- event.payload.eventKey != "pr:merged"
- event.payload.actor.name != "xxxxxxxxxxxxx"
action:
run_job_template:
name: "my_job_template"
< . . . >
In the case of the non-working code, the template never gets run, ie, I see nothing in the jobs output in AAP and can find no other logs to indicate an issue.
If I send a test message to the service from bitbucket, I get a 200 back, so I know the service and route in openshift are okay. Am I just missing something simple? If I revert the rulebook code back to the working one, everything suddenly is good again.