-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The run_job_template action is not passing the host limit correctly #510
Comments
I think the problem is not in the job_template action but in the webhook plugin because the webhook plugin is putting the payload in a nested field in the event. The webhook plugin is not able to receive it directly. The way to do it is using the |
@Alex-Izquierdo I tried the following but no luck, anything that stands out? There's not a lot of documentation so I am going off of just the python code that you provided and debugging.
Here is the log output from EDA Controller
|
Hi @AdamMack2007 There is no need to pass directly the "limit" arg to the action, ansible-rulebook will do it implicitly based on All looks fine. What it is the exact problem in this new try? We would need to see the whole output to determine what it's happening. |
Here are the issues I'm experiencing:
This is my debug output from "event.meta"
I understand it's supposed to happen behind the scenes, but is there any reason we cannot override that default behavior and inject a variable? Also, is there a particular log that would help with troubleshooting this? |
The flag Take into account that your Job template must enable the option "prompt on launch" to be able to process the limit arg. Ref: https://stackoverflow.com/questions/71687700/ansible-tower-api-pass-inventory-for-a-job-in-a-post-payload/71804727#71804727 |
PLAYBOOK: recieved-event.yml *************************************************** It's able to extract host info as subset, however it's end up with what is this subset doing here. it's extracted from events.meta { |
Please confirm the following
Bug Summary
When a condition is triggered, the run_job_template action is not successfully passing the limit variable to Automation Controller.
The log output from EDA looks correct, as seen in the 'Actual Results' log output, but Controller shows the limit as 'Limit: {{ event.payload.meta.hosts }}'
Environment
version = '0.13.0'
Executable location = /opt/app-root/bin/ansible-rulebook
Drools_jpy version = 0.3.1
Java home = /usr/lib/jvm/java-17-openjdk
Java version = 17.0.7
Python version = 3.9.16 (main, Dec 21 2022, 10:57:18) [GCC 8.5.0 20210514 (Red Hat 8.5.0-17)]
Steps to reproduce
Testing via curl
curl -X POST http://192.168.6.109:5000/endpoint -d '{"message": "BGP neighbor down","meta": {"hosts": "leaf3"}}' -H 'Content-Type: application/json'
Actual results
EDA log output
Controller limit setting:
Expected results
Automation controller shows the correct host limit and not the variable string.
Additional information
No response
The text was updated successfully, but these errors were encountered: