From 39b45ba6eda31468f27e11bc61f7ccdfeb8e4ab0 Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Mon, 23 Nov 2020 01:45:14 +0100 Subject: [PATCH] updated dkron state and modules --- states/_states/dkron.py | 4 ++-- states/dkron/jobs.sls | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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 }}