shanemcd.awx.schedule_rrule (20.0.14) — lookup

Generate an rrule string which can be used for Schedules

Authors: John Westcott IV (@john-westcott-iv)

Install collection

Install with ansible-galaxy collection install shanemcd.awx:==20.0.14


Add to requirements.yml

  collections:
    - name: shanemcd.awx
      version: 20.0.14

Description

Returns a string based on criteria which represents an rrule


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
    - name: Create a string for a schedule
      debug:
        msg: "{{ query('awx.awx.schedule_rrule', 'none', start_date='1979-09-13 03:45:07') }}"

Inputs

    
every:
    description:
    - The repetition in months, weeks, days hours or minutes
    - Used for all types except none
    type: int

_terms:
    choices:
    - none
    - minute
    - hour
    - day
    - week
    - month
    description:
    - 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
    required: true

end_on:
    description:
    - 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
    type: str

on_the:
    description:
    - 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

on_days:
    description:
    - 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

timezone:
    description:
    - The timezone to use for this rule
    - Used for all frequencies
    - Format should be as US/Eastern
    - Defaults to America/New_York
    type: str

start_date:
    description:
    - The date to start the rule
    - Used for all frequencies
    - Format should be YYYY-MM-DD [HH:MM:SS]
    type: str

month_day_number:
    description:
    - The day of the month this schedule will run on (0-31)
    - Used for month type schedules
    - Cannot be used with on_the parameter
    type: int

Outputs

_raw:
  description:
  - String in the rrule format
  type: string