From 3da7d4e3d7ea44cb8cf6313e151d7a17e83bcaae Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Fri, 10 Mar 2023 00:09:10 +0100 Subject: [PATCH] updated _states state --- states/_states/dkron.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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