This commit is contained in:
parent
9271de25fb
commit
3da7d4e3d7
@ -4,13 +4,14 @@ import salt.utils.dictupdate
|
|||||||
import salt.utils.dictdiffer
|
import salt.utils.dictdiffer
|
||||||
|
|
||||||
|
|
||||||
def jobs(name, url="http://localhost:8080", verify=False, jobs_list=[]):
|
def jobs(name, url="http://localhost:8080", verify=False, jobs={}):
|
||||||
ret = {'name': name,
|
ret = {'name': name,
|
||||||
'changes': {},
|
'changes': {},
|
||||||
'result': True,
|
'result': True,
|
||||||
'comment': 'Config is up to date'}
|
'comment': 'Config is up to date'}
|
||||||
|
|
||||||
for job in jobs_list:
|
for name, job in jobs.items():
|
||||||
|
job['name'] = name
|
||||||
res = __salt__['dkron.set_jobs'](url, job)
|
res = __salt__['dkron.set_jobs'](url, job)
|
||||||
if res is not None:
|
if res is not None:
|
||||||
ret['changes'][job['name']] = res
|
ret['changes'][job['name']] = res
|
||||||
|
Loading…
Reference in New Issue
Block a user