diff --git a/states/_states/dkron.py b/states/_states/dkron.py index 3804bb5..6bc4555 100644 --- a/states/_states/dkron.py +++ b/states/_states/dkron.py @@ -4,7 +4,7 @@ from __future__ import absolute_import, print_function, unicode_literals import salt.utils.dictupdate import salt.utils.dictdiffer -def jobs(name, url="http://localhost:8080", verify=False, job_list=[]): +def jobs(name, url="http://localhost:8080", verify=False, jobs=[]): ret = {'name': name, 'changes': {}, 'result': True, @@ -13,7 +13,7 @@ def jobs(name, url="http://localhost:8080", verify=False, job_list=[]): #dk_jobs = [] #dk_jobs = __salt__['dkron.get_jobs'](url, verify) - for job in job_list: + for job in jobs: res = __salt__['dkron.set_jobs'](url, verify, job) if res is not None: ret['changes'][job['name']] = res diff --git a/states/dkron/jobs.sls b/states/dkron/jobs.sls index d434a30..1240dbe 100644 --- a/states/dkron/jobs.sls +++ b/states/dkron/jobs.sls @@ -5,4 +5,4 @@ dkron-jobs: - name: dkron-jobs - url: {{ dkron.url }} - verify: {{ dkron.verify }} - - job_list: {{ dkron.job_list }} + - job_list: {{ dkron.jobs }}