Create Ansible Tower plugin procedures

3 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 and Wait a Job Template

Launches a job template and waits for its execution.

Input parameters

Table 7. 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 8. 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 9. List Inventories input parameters
Parameter Description

Configuration name

Required. The previously defined configuration for the plugin.

Output parameters

Table 10. List Inventories output parameters
Parameter Description

result

The REST API result.

List Job Templates

Lists all job templates

Input parameters

Table 11. List Job Templates input parameters
Parameter Description

Configuration name

Required. The previously defined configuration for the plugin.

Output parameters

Table 12. List Job Templates output parameters
Parameter Description

result

The REST API result.

List Organizations

Lists all organizations.

Input parameters

Table 13. List Organizations input parameters
Parameter Description

Configuration name

Required. The previously defined configuration for the plugin.

Output parameters

Table 14. List Organizations output parameters
Parameter Description

result

The REST API result.

List Projects

Lists all projects.

Input parameters

Table 15. List Projects input parameters
Parameter Description

Configuration name

Required. The previously defined configuration for the plugin.

Output parameters

Table 16. List Projects output parameters
Parameter Description

result

The REST API result.

Retrieve a Job Template

Retrieves a job template.

Input parameters

Table 17. 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 18. Retrieve a Job Template output parameters
Parameter Description

result

The REST API result.

link

A link to the job template.

Retrieve an Inventory

Retrieves an inventory.

Input parameters

Table 19. 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 20. Retrieve an Inventory output parameters
Parameter Description

result

The REST API result.

link

A link to the inventory.