Skip to content

Commit

Permalink
add db and rp to dbrp
Browse files Browse the repository at this point in the history
  • Loading branch information
aabouzaid committed Mar 7, 2018
1 parent bf5e1ad commit 8d04e3f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions salt/states/kapacitor.py
Expand Up @@ -71,6 +71,11 @@ def task_present(name,

task = __salt__['kapacitor.get_task'](name)
old_script = task['script'] if task else ''
if not dbrps:
dbrps = []
if (database and retention_policy):
dbrp = '{0}.{1}'.format(database, retention_policy)
dbrps.append(dbrp)
task_dbrps = [{'db': dbrp[0], 'rp': dbrp[1]} for dbrp in (dbrp.split('.') for dbrp in dbrps)]

if tick_script.startswith('salt://'):
Expand Down

0 comments on commit 8d04e3f

Please sign in to comment.