awx.awx.schedule – create, update, or destroy Automation Platform Controller schedules.

Note

This plugin 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

Parameters

Parameter Choices/Defaults Comments
controller_config_file
path
Path to the controller config file.
If provided, the other locations for config files will not be considered.

aliases: tower_config_file
controller_host
string
URL to your Automation Platform Controller instance.
If value not set, will try environment variable CONTROLLER_HOST and then config files
If value not specified by any means, the value of 127.0.0.1 will be used

aliases: tower_host
controller_oauthtoken
raw
added in 3.7.0 of awx.awx
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 CONTROLLER_OAUTH_TOKEN and then config files

aliases: tower_oauthtoken
controller_password
string
Password for your controller instance.
If value not set, will try environment variable CONTROLLER_PASSWORD and then config files

aliases: tower_password
controller_username
string
Username for your controller instance.
If value not set, will try environment variable CONTROLLER_USERNAME and then config files

aliases: tower_username
credentials
list / elements=string
List of credentials applied as a prompt, assuming job template prompts for credentials
description
string
Optional description of this schedule.
diff_mode
boolean
    Choices:
  • no
  • yes
Enable diff mode for the job template.
enabled
boolean
    Choices:
  • no
  • yes
Enables processing of this schedule.
extra_data
dictionary
Default:
{}
Specify extra_vars for the template.
inventory
string
Inventory applied as a prompt, assuming job template prompts for inventory
job_tags
string
Comma separated list of the tags to use for the job template.
job_type
string
    Choices:
  • run
  • check
The job type to use for the job template.
limit
string
A host pattern to further constrain the list of hosts managed or affected by the playbook
name
string / required
Name of this schedule.
new_name
string
Setting this option will change the existing name (looked up via the name field.
organization
string
The organization the unified job template exists in.
Used for looking up the unified job template, not a direct model field.
rrule
string
A value representing the schedules iCal recurrence rule.
See rrule plugin for help constructing this value
scm_branch
string
Branch to use in job run. Project default used if blank. Only allowed if project allow_override field is set to true.
skip_tags
string
Comma separated list of the tags to skip for the job template.
state
string
    Choices:
  • present ←
  • absent
Desired state of the resource.
unified_job_template
string
Name of unified job template to schedule.
validate_certs
boolean
    Choices:
  • no
  • yes
Whether to allow insecure connections to AWX.
If no, SSL certificates will not be validated.
This should only be used on personally controlled sites using self-signed certificates.
If value not set, will try environment variable CONTROLLER_VERIFY_SSL and then config files

aliases: tower_verify_ssl
verbosity
integer
    Choices:
  • 0
  • 1
  • 2
  • 3
  • 4
  • 5
Control the output level Ansible produces as the playbook runs. 0 - Normal, 1 - Verbose, 2 - More Verbose, 3 - Debug, 4 - Connection Debug.

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)