Modifying schedules API to allow for rrulesets #5733 (#12043)

* Added schedule_rruleset lookup plugin for awx.awx
* Added DB migration for rrule size
* Updated schedule docs
* The schedule API endpoint will now return an array of errors on rule validation to try and inform the user of all errors instead of just the first
This commit is contained in:
John Westcott IV
2022-04-28 15:38:20 -04:00
committed by GitHub
parent 2bef5ce09b
commit c67f50831b
10 changed files with 1207 additions and 118 deletions

View File

@@ -143,6 +143,21 @@ EXAMPLES = '''
unified_job_template: "Demo Job Template"
rrule: "{{ query('awx.awx.schedule_rrule', 'week', start_date='2019-12-19 13:05:51') }}"
register: result
- name: Build a complex schedule for every day except sunday using the rruleset plugin
schedule:
name: "{{ sched1 }}"
state: present
unified_job_template: "Demo Job Template"
rrule: "{{ query(awx.awx.schedule_rruleset, '2022-04-30 10:30:45', rules=rrules, timezone='UTC' ) }}"
vars:
rrules:
- frequency: 'day'
every: 1
- frequency: 'day'
every: 1
on_days: 'sunday'
include: False
'''
from ..module_utils.controller_api import ControllerAPIModule
@@ -255,7 +270,8 @@ def main():
new_fields,
endpoint='schedules',
item_type='schedule',
associations=association_fields,)
associations=association_fields,
)
if __name__ == '__main__':