Skip to main content

Overview

Job templates define parameters for running Ansible playbooks. They combine a project, playbook, inventory, and credentials into a reusable template that can be launched on-demand or scheduled.

Endpoints

List Job Templates

Create Job Template

string
required
Job template name
string
Job template description
string
default:"run"
Job type: run or check
integer
required
Inventory ID
integer
required
Project ID
string
required
Playbook filename from the project
array
Array of credential IDs
integer
default:"0"
Number of parallel processes (0 = use Ansible default)
string
Host pattern to limit job execution
integer
default:"0"
Ansible verbosity: 0-5 (0=normal, 5=connection debug)
string
Extra variables in YAML or JSON
string
Comma-separated Ansible tags to run
string
Comma-separated Ansible tags to skip
string
Task name to start at
integer
default:"0"
Job timeout in seconds (0 = no timeout)
boolean
default:"false"
Show differences when files are changed
boolean
default:"false"
Allow multiple jobs from this template to run simultaneously
boolean
default:"false"
Use Ansible fact cache
boolean
default:"false"
Enable privilege escalation
string
Enable provisioning callback with this key
boolean
Prompt for field at launch:
  • ask_inventory_on_launch
  • ask_credential_on_launch
  • ask_limit_on_launch
  • ask_tags_on_launch
  • ask_skip_tags_on_launch
  • ask_job_type_on_launch
  • ask_verbosity_on_launch
  • ask_variables_on_launch
  • ask_scm_branch_on_launch
  • ask_diff_mode_on_launch
  • ask_execution_environment_on_launch
  • ask_labels_on_launch
  • ask_forks_on_launch
  • ask_job_slice_count_on_launch
  • ask_timeout_on_launch
  • ask_instance_groups_on_launch
boolean
default:"false"
Enable survey
string
Enable webhook: github or gitlab
integer
Webhook credential ID
integer
Execution environment ID
array
Array of label IDs
array
Array of instance group IDs
integer
default:"1"
Number of job slices for distributed execution

Retrieve Job Template

Response includes all fields plus:
string
Template status: new, pending, waiting, running, successful, failed, error, canceled, never updated, ok, missing
string
Last job execution timestamp
boolean
Whether last job failed
string
Next scheduled run
Links to related resources:
  • organization - Parent organization
  • inventory - Job inventory
  • project - Source project
  • execution_environment - Execution environment
  • credentials - Attached credentials
  • labels - Associated labels
  • jobs - Job history
  • schedules - Execution schedules
  • launch - Launch endpoint
  • webhook_key - Webhook configuration
  • webhook_receiver - Webhook URL
  • activity_stream - Activity log
  • notification_templates_* - Notification templates
  • survey_spec - Survey specification
  • access_list - Access list
  • object_roles - Available roles
  • instance_groups - Instance groups
  • slice_workflow_jobs - Slice workflow jobs
  • copy - Copy endpoint

Update Job Template

Delete Job Template

Launch Job

Promptable fields can be overridden at launch if ask_*_on_launch is enabled. Returns a job object with status URL.

Survey Specification

Get Survey

Create/Update Survey

Delete Survey

Jobs

List jobs created from this template:

Schedules

Labels

Instance Groups

Credentials

Notifications

Webhooks

Get Webhook Key

Regenerate Webhook Key

Provisioning Callback

Enable callback to allow hosts to trigger their own configuration:
  1. Set host_config_key on the job template
  2. Configure the callback URL on the host

Object Roles

Available roles:
  • admin_role - Full template administration
  • execute_role - Launch jobs from template
  • read_role - View template details

Copy Job Template

Filtering

Complete Example