Ansible Automation Platform Provision and Run Job
A 3-step recipe with Red Hat. We can help you get access.
Recipe · 3 steps
Ansible Automation Platform Provision and Run Job
with Red Hat · IT Operations Management
Create a job template, launch a job from it, and wait for the run to finish.
- Create a new job template bound to the supplied project, inventory, and playbook so it can be launched on demand.
- Launch a job from the freshly created template, optionally overriding the run with extra variables.
- Retrieve the job record and check whether it has reached a terminal status. While the job is still new, pending, waiting, or running, repeat this step.
What you'll need to have ready
- token: OAuth2 bearer token for the Automation Platform API.
- name: The display name for the new job template.
- description: A human-readable description of the job template.
- job_type: The job type, e.g. "run" or "check".
- inventory: The id of the inventory the template runs against.
- project: The id of the project that supplies the playbook.
- playbook: The playbook file name to execute.
- extra_vars: Optional extra variables to pass into the launched job.
For your developer
Arazzo workflow red-hat:provision-and-run-job, 3 operations: createJobTemplate → launchJobTemplate → getJob. Specs on APIs.io.