Create Ansible Tower plugin procedures

4 minute readExtensibilityDeveloper productivity

Plugin procedures can be used in procedure steps, process steps, and pipeline tasks, allowing you to orchestrate third-party tools at the appropriate time in your component, application process, or pipeline.

Depending on your plugin configuration and how you run procedures, the Input parameters  Configuration name field may behave differently in the CloudBees CD/RO UI. For more information, refer to Differences in plugin UI behavior.

Create a Job Template

Creates a job template.

Input parameters

Table 1. Create a Job Template input parameters
Parameter Description

Configuration name

Required. The previously defined configuration for the plugin.

JSON body

Required. JSON body to send.

Output parameters

Table 2. Create a Job Template output parameters
Parameter Description

result

The REST API result.

id

The ID of the job template.

link

A link to the job template.

Create an Inventory

Creates an inventory.

Input parameters

Table 3. Create an Inventory input parameters
Parameter Description

Configuration name

Required. The previously defined configuration for the plugin.

JSON body

Required. The JSON body to send.

Output parameters

Table 4. Create an Inventory output parameters
Parameter Description

result

The REST API result.

id

The ID of the inventory.

link

A link to the inventory.

Launch a Job Template

Launches a job template.

Input parameters

Table 5. Launch a Job Template input parameters
Parameter Description

Configuration name

Required. The previously defined configuration for the plugin.

Job template name/ID

Required. The ID or name of the job template to launch.

Job template parameters

Parameters of the job template to launch. For example, { "extra_vars": {"foo": "bar"} }.

Output parameters

Table 6. Launch a Job Template output parameters
Parameter Description

result

The REST API result.

id

The ID of the launched job.

link

A link to the launched job.

Launch a Workflow Job Template

Launches a workflow job template.

Input parameters

Table 7. Launch a Workflow Job Template input parameters
Parameter Description

Configuration name

Required. The previously defined configuration for the plugin.

Required. The ID or name of the workflow job template to launch.

Output parameters

Table 8. Launch a Workflow Job Template output parameters
Parameter Description

result

The REST API result.

Launch and Wait a Job Template

Launches a job template and waits for its execution.

Input parameters

Table 9. Launch and Wait a Job Template input parameters
Parameter Description

Configuration name

Required. The previously defined configuration for the plugin.

Job template name/ID

Required. The ID or name of the job template to launch.

Job template parameters

Parameters of the job template to launch. For example, { "extra_vars": {"foo": "bar"} }.

Job status polling interval

Specifies the frequency, in seconds, to check the job status.

Depend on Ansible Tower job result?

If selected, the job result is synchronized with the Ansible Tower job result.

Output parameters

Table 10. Launch and Wait a Job Template output parameters
Parameter Description

result

The REST API result.

id

The ID of the launched job.

link

A link to the launched job.

job_status

The status of the launched job.

stdout

STDOUT from the finished job.

List Inventories

Lists all inventories.

Input parameters

Table 11. List Inventories input parameters
Parameter Description

Configuration name

Required. The previously defined configuration for the plugin.

Output parameters

Table 12. List Inventories output parameters
Parameter Description

result

The REST API result.

List Job Templates

Lists all job templates

Input parameters

Table 13. List Job Templates input parameters
Parameter Description

Configuration name

Required. The previously defined configuration for the plugin.

Output parameters

Table 14. List Job Templates output parameters
Parameter Description

result

The REST API result.

List Organizations

Lists all organizations.

Input parameters

Table 15. List Organizations input parameters
Parameter Description

Configuration name

Required. The previously defined configuration for the plugin.

Output parameters

Table 16. List Organizations output parameters
Parameter Description

result

The REST API result.

List Projects

Lists all projects.

Input parameters

Table 17. List Projects input parameters
Parameter Description

Configuration name

Required. The previously defined configuration for the plugin.

Output parameters

Table 18. List Projects output parameters
Parameter Description

result

The REST API result.

List Workflow Job Templates

Lists all workflow job templates.

Input parameters

Table 19. List Workflow Job Templates input parameters
Parameter Description

Configuration name

Required. The previously defined configuration for the plugin.

Search

Performs a case-insensitive search across all relevant text fields, such as name, description, etc. If left empty, it will return all workflow job templates.

Output parameters

Table 20. List Workflow Job Templates output parameters
Parameter Description

workflowJobTemplates

The REST API result containing workflow job templates.

Retrieve a Job Template

Retrieves a job template.

Input parameters

Table 21. Retrieve a Job Template input parameters
Parameter Description

Configuration name

Required. The previously defined configuration for the plugin.

Job template name/ID

Required. The ID or name of the job template to retrieve.

Output parameters

Table 22. Retrieve a Job Template output parameters
Parameter Description

result

The REST API result.

link

A link to the job template.

Retrieve a Workflow Job Template

Retrieves a specific workflow job template.

Input parameters

Table 23. Retrieve a Workflow Job Template input parameters
Parameter Description

Configuration name

Required. The previously defined configuration for the plugin.

id

Required. ID of a workflow job template to retrieve.

Output parameters

Table 24. Retrieve a Workflow Job Template output parameters
Parameter Description

Result

Details of the retrieved workflow job template.

Retrieve an Inventory

Retrieves an inventory.

Input parameters

Table 25. Retrieve an Inventory input parameters
Parameter Description

Configuration name

Required. The previously defined configuration for the plugin.

Inventory ID

Required. The ID of the inventory to retrieve.

Output parameters

Table 26. Retrieve an Inventory output parameters
Parameter Description

result

The REST API result.

link

A link to the inventory.