awx.awx.schedule module – create, update, or destroy Automation Platform Controller schedules.
Note
This module is part of the awx.awx collection (version 19.4.0).
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.schedule
.
Synopsis
Create, update, or destroy Automation Platform Controller schedules. See https://www.ansible.com/tower for an overview.
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 |
|
List of credentials applied as a prompt, assuming job template prompts for credentials |
|
Optional description of this schedule. |
|
Enable diff mode for the job template. Choices:
|
|
Enables processing of this schedule. Choices:
|
|
Specify Default: {} |
|
Inventory applied as a prompt, assuming job template prompts for inventory |
|
Comma separated list of the tags to use for the job template. |
|
The job type to use for the job template. Choices:
|
|
A host pattern to further constrain the list of hosts managed or affected by the playbook |
|
Name of this schedule. |
|
Setting this option will change the existing name (looked up via the name field. |
|
The organization the unified job template exists in. Used for looking up the unified job template, not a direct model field. |
|
A value representing the schedules iCal recurrence rule. See rrule plugin for help constructing this value |
|
Branch to use in job run. Project default used if blank. Only allowed if project allow_override field is set to true. |
|
Comma separated list of the tags to skip for the job template. |
|
Desired state of the resource. Choices:
|
|
Name of unified job template to schedule. |
|
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:
|
|
Control the output level Ansible produces as the playbook runs. 0 - Normal, 1 - Verbose, 2 - More Verbose, 3 - Debug, 4 - Connection Debug. 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: Build a schedule for Demo Job Template
schedule:
name: "{{ sched1 }}"
state: present
unified_job_template: "Demo Job Template"
rrule: "DTSTART:20191219T130551Z RRULE:FREQ=WEEKLY;INTERVAL=1;COUNT=1"
register: result
- name: Build the same schedule using the rrule plugin
schedule:
name: "{{ sched1 }}"
state: present
unified_job_template: "Demo Job Template"
rrule: "{{ query('awx.awx.schedule_rrule', 'week', start_date='2019-12-19 13:05:51') }}"
register: result
Authors
John Westcott IV (@john-westcott-iv)