ansible / eda-server

Event Driven Ansible for AAP
Apache License 2.0
59 stars 35 forks source link

fix: build the JOB URL on the server side #948

Closed mkanoor closed 3 weeks ago

mkanoor commented 4 weeks ago

With the advent of controller behind our server the URL to access the job details for JobTemplate and WorkflowTemplate has changed

We have an api end point that is specificed in the RH AAP Credential Type this is sent to the ansible-rulebook so that it can talk to the controller via the api. This end point could point to a controller directly or to a controller behind our server.

To directly access the controller we only need the host and port so the API end point would look like e.g. https://<>/

This will map the Job URL for a Job Template to look like https://<>/#/jobs/playbook/23/details/ This will map the Job URL for a Workflow Template to look like https://<>/#/jobs/workflow/24/details/

When the controller is behind our server the API end point is e.g. https://<>/api/controller

This will map the Job URL for a Job Template to look like https://<>/execution/jobs/playbook/25/details/ This will map the Job URL for a Workflow Template to look like https://<>/execution/jobs/workflow/26/details/

For this to work correctly we need ansible-rulebook to pass in the controller_job_id and the action_type. Currently it doesn't send up the controller_job_id which is being fixed in a separate PR.

https://issues.redhat.com/browse/AAP-25604