awx.awx.schedule_rrule lookup – Generate an rrule string which can be used for Schedules
Note
This lookup plugin 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
.
You need further requirements to be able to use this lookup plugin,
see Requirements for details.
To use it in a playbook, specify: awx.awx.schedule_rrule
.
Synopsis
Returns a string based on criteria which represents an rrule
Aliases: tower_schedule_rrule
Requirements
The below requirements are needed on the local controller node that executes this lookup.
pytz
python-dateutil >= 2.7.0
Terms
Parameter |
Comments |
---|---|
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 Choices:
|
Keyword parameters
This describes keyword parameters of the lookup. These are the values key1=value1
, key2=value2
and so on in the following
examples: lookup('awx.awx.schedule_rrule', key1=value1, key2=value2, ...)
and query('awx.awx.schedule_rrule', key1=value1, key2=value2, ...)
Parameter |
Comments |
---|---|
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 |
|
The repetition in months, weeks, days hours or minutes Used for all types except none |
|
The day of the month this schedule will run on (0-31) Used for month type schedules Cannot be used with on_the parameter |
|
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 |
|
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 |
|
The date to start the rule Used for all frequencies Format should be YYYY-MM-DD [HH:MM:SS] |
|
The timezone to use for this rule Used for all frequencies Format should be as US/Eastern Defaults to America/New_York |
Notes
Note
When keyword and positional parameters are used together, positional parameters must be listed before keyword parameters:
lookup('awx.awx.schedule_rrule', term1, term2, key1=value1, key2=value2)
andquery('awx.awx.schedule_rrule', term1, term2, key1=value1, key2=value2)
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 Value
Key |
Description |
---|---|
String in the rrule format Returned: success |