On this page
awx.awx.tower_schedule – create, update, or destroy Ansible Tower schedules.
Note
This plugin is part of the awx.awx collection (version 17.0.1).
To install it use: ansible-galaxy collection install awx.awx
.
To use it in a playbook, specify: awx.awx.tower_schedule
.
Synopsis
- Create, update, or destroy Ansible Tower schedules. See https://www.ansible.com/tower for an overview.
Parameters
Parameter | Choices/Defaults | Comments |
---|---|---|
description
string
|
Optional description of this schedule.
|
|
diff_mode
boolean
|
|
Enable diff mode for the job template.
|
enabled
boolean
|
|
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
|
|
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.
|
|
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
|
|
Desired state of the resource.
|
tower_config_file
path
|
Path to the Tower or AWX config file.
If provided, the other locations for config files will not be considered.
|
|
tower_host
string
|
URL to your Tower or AWX instance.
If value not set, will try environment variable
TOWER_HOST and then config files
If value not specified by any means, the value of 127.0.0.1 will be used
|
|
tower_oauthtoken
raw
added in 3.7 of awx.awx
|
The Tower 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 tower_token module.
If value not set, will try environment variable TOWER_OAUTH_TOKEN and then config files
|
|
tower_password
string
|
Password for your Tower or AWX instance.
If value not set, will try environment variable TOWER_PASSWORD and then config files
|
|
tower_username
string
|
Username for your Tower or AWX instance.
If value not set, will try environment variable TOWER_USERNAME and then config files
|
|
unified_job_template
string
|
Name of unified job template to schedule.
|
|
validate_certs
boolean
|
|
Whether to allow insecure connections to Tower or 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
TOWER_VERIFY_SSL and then config files
aliases: tower_verify_ssl |
verbosity
integer
|
|
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 Tower host information.
- config_file should contain Tower configuration in the following format host=hostname username=username password=password
Examples
- name: Build a schedule for Demo Job Template
tower_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
tower_schedule:
name: "{{ sched1 }}"
state: present
unified_job_template: "Demo Job Template"
rrule: "{{ query('awx.awx.tower_schedule_rrule', 'week', start_date='2019-12-19 13:05:51') }}"
register: result
Authors
- John Westcott IV (@john-westcott-iv)
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.11/collections/awx/awx/tower_schedule_module.html