On this page
awx.awx.schedule_rrule – Generate an rrule string which can be used for 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_rrule
.
Synopsis
- Returns a string based on criteria which represents an rrule
Requirements
The below requirements are needed on the local controller node that executes this lookup.
- pytz
- python-dateutil >= 2.7.0
Parameters
Parameter | Choices/Defaults | Configuration | Comments |
---|---|---|---|
_terms
string / required
|
|
The frequency of the schedule
none - Run this schedule once
minute - Run this schedule every x minutes
hour - Run this schedule every x hours
day - Run this schedule every x days
week - Run this schedule weekly
month - Run this schedule monthly
|
|
end_on
string
|
How to end this schedule
If this is not defined, this schedule will never end
If this is a positive integer, this schedule will end after this number of occurences
If this is a date in the format YYYY-MM-DD [HH:MM:SS], this schedule ends after this date
Used for all types except none
|
||
every
integer
|
The repetition in months, weeks, days hours or minutes
Used for all types except none
|
||
month_day_number
integer
|
The day of the month this schedule will run on (0-31)
Used for month type schedules
Cannot be used with on_the parameter
|
||
on_days
string
|
The days to run this schedule on
A comma-separated list which can contain values sunday, monday, tuesday, wednesday, thursday, friday
Used for week type schedules
|
||
on_the
string
|
A description on when this schedule will run
Two strings separated by a space
First string is one of first, second, third, fourth, last
Second string is one of sunday, monday, tuesday, wednesday, thursday, friday
Used for month type schedules
Cannot be used with month_day_number parameters
|
||
start_date
string
|
The date to start the rule
Used for all frequencies
Format should be YYYY-MM-DD [HH:MM:SS]
|
||
timezone
string
|
The timezone to use for this rule
Used for all frequencies
Format should be as US/Eastern
Defaults to America/New_York
|
Examples
- name: Create a string for a schedule
debug:
msg: "{{ query('awx.awx.schedule_rrule', 'none', start_date='1979-09-13 03:45:07') }}"
Return Values
Common return values are documented here, the following are the fields unique to this lookup:
Key | Returned | Description |
---|---|---|
_raw
string
|
success |
String in the rrule format
|
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/latest/collections/awx/awx/schedule_rrule_lookup.html