awx.awx.bulk_job_launch module – Bulk job launch in Automation Platform Controller
Note
This module is part of the awx.awx collection (version 24.6.1).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install awx.awx
.
To use it in a playbook, specify: awx.awx.bulk_job_launch
.
Synopsis
Single-request bulk job launch in Automation Platform Controller.
Creates a workflow where each node corresponds to an item specified in the jobs option.
Any options specified at the top level will inherited by the launched jobs (if prompt on launch is enabled for those fields).
Provides a way to submit many jobs at once to Controller.
Parameters
Parameter |
Comments |
---|---|
Path to the controller config file. If provided, the other locations for config files will not be considered. |
|
URL to your Automation Platform Controller instance. If value not set, will try environment variable If value not specified by any means, the value of |
|
The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable |
|
Password for your controller instance. If value not set, will try environment variable |
|
Username for your controller instance. If value not set, will try environment variable |
|
Optional description of this bulk job. |
|
Any extra vars required to launch the job. Extends the extra_data field at the individual job level. |
|
The interval to request an update from the controller. Default: |
|
Inventory name, ID, or named URL to use for the jobs ran within the bulk job, only used if prompt for inventory is set. |
|
A comma-separated list of playbook tags to specify what parts of the playbooks should be executed. |
|
List of jobs to create. |
|
Credential IDs applied as a prompt, if job template prompts for credentials |
|
Show the changes made by Ansible tasks where supported Choices:
|
|
Execution environment ID applied as a prompt, if job template prompts for execution environments |
|
Extra variables to apply at launch time, if job template prompts for extra variables Default: |
|
The number of parallel or simultaneous processes to use while executing the playbook, if job template prompts for forks |
|
Identifier for the resulting workflow node that represents this job |
|
Instance group IDs applied as a prompt, if job template prompts for instance groups |
|
Inventory ID applied as a prompt, if job template prompts for inventory |
|
The number of jobs to slice into at runtime, if job template prompts for job slices. Will cause the Job Template to launch a workflow if value is greater than 1. Default: |
|
Job tags applied as a prompt, if job template prompts for job tags |
|
Job type applied as a prompt, if job template prompts for job type Choices:
|
|
Label IDs to use for the job, if job template prompts for labels |
|
Limit to act on, applied as a prompt, if job template prompts for limit |
|
SCM branch applied as a prompt, if job template prompts for SCM branch This is only applicable if the project allows for branch override |
|
Tags to skip, applied as a prompt, if job template prompts for job tags |
|
Maximum time in seconds to wait for a job to finish (server-side), if job template prompts for timeout. |
|
Job template ID to use when launching. |
|
Verbosity level for this ad hoc command run Choices:
|
|
Limit to use for the bulk job. |
|
The name of the bulk job that is created |
|
If not provided, will use the organization the user is in. Required if the user belongs to more than one organization. Affects who can see the resulting bulk job. |
|
Specify the timeout Ansible should use in requests to the controller host. Defaults to 10s, but this is handled by the shared module_utils code |
|
A specific branch of the SCM project to run the template on. This is only applicable if the project allows for branch override. |
|
A comma-separated list of playbook tags to skip certain tasks or parts of the playbooks to be executed. |
|
Whether to allow insecure connections to AWX. If This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable Choices:
|
|
Wait for the bulk job to complete. Choices:
|
Notes
Note
If no config_file is provided we will attempt to use the tower-cli library defaults to find your host information.
config_file should be in the following format host=hostname username=username password=password
Examples
- name: Launch bulk jobs
bulk_job_launch:
name: My Bulk Job Launch
jobs:
- unified_job_template: 7
skip_tags: foo
- unified_job_template: 10
limit: foo
extra_data:
food: carrot
color: orange
limit: bar
credentials:
- "My Credential"
- "suplementary cred"
extra_vars: # these override / extend extra_data at the job level
food: grape
animal: owl
organization: Default
inventory: Demo Inventory
- name: Launch bulk jobs with lookup plugin
bulk_job_launch:
name: My Bulk Job Launch
jobs:
- unified_job_template: 7
- unified_job_template: "{{ lookup('awx.awx.controller_api', 'job_templates', query_params={'name': 'Demo Job Template'},
return_ids=True, expect_one=True) }}"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
dictionary containing information about the bulk job executed Returned: If bulk job launched |