diff --git a/states/_states/dkron.py b/states/_states/dkron.py index 2c254c4..5078358 100644 --- a/states/_states/dkron.py +++ b/states/_states/dkron.py @@ -4,13 +4,14 @@ import salt.utils.dictupdate 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, 'changes': {}, 'result': True, '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) if res is not None: ret['changes'][job['name']] = res