mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Ensure we pass on the enable setting if present, or use the default of True if not in build_schedule_item()
Prior to this, when schedule.present compares the existing schedule to the one crafted by this function, enabled will actually be removed at each run. schedule.present sees a modification needs to be made, and invokes schedule.modify, which does so with enabled: True, creating and endless loop of an 'enabled' removal and addition.
This commit is contained in:
parent
5dd1b70475
commit
bfbf63e1cc
1 changed files with 5 additions and 0 deletions
|
@ -275,6 +275,11 @@ def build_schedule_item(name, **kwargs):
|
|||
else:
|
||||
schedule[name]['name'] = name
|
||||
|
||||
if 'enabled' in kwargs:
|
||||
schedule[name]['enabled'] = kwargs['enabled']
|
||||
else:
|
||||
schedule[name]['enabled'] = True
|
||||
|
||||
if 'jid_include' not in kwargs or kwargs['jid_include']:
|
||||
schedule[name]['jid_include'] = True
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue