code: def task_absent(name):
      '''
      Ensure that a task is absent from Kapacitor.
  
      name
          Name of the task.
      '''
      ret = {'name': name, 'changes': {}, 'result': True, 'comment': ''}
  
      task = __salt__['kapacitor.get_task'](name)
  
      if task:
          if __opts__['test']:
              ret['result'] = None
              ret['comment'] = 'Task would have been deleted'
          else:
              result = __salt__['kapacitor.delete_task'](name)
              ret['result'] = result['success']
              if not ret['result']:
                  ret['comment'] = 'Could not disable task'
                  if result.get('stderr'):
                      ret['comment'] += '\n' + result['stderr']
                  return ret
              ret['comment'] = 'Task was deleted'
          ret['changes'][name] = 'deleted'
      else:
          ret['comment'] = 'Task does not exist'
  
      return ref task_absent(name):
      '''
      Ensure that a task is absent from Kapacitor.
  
      name
          Name of the task.
      '''
      ret = {'name': name, 'changes': {}, 'result': True, 'comment': ''}
  
      task = __salt__['kapacitor.get_task'](name)
  
      if task:
          if __opts__['test']:
              ret['result'] = None
              ret['comment'] = 'Task would have been deleted'
          else:
              result = __salt__['kapacitor.delete_task'](name)
              ret['result'] = result['success']
              if not ret['result']:
                  ret['comment'] = 'Could not disable task'
                  if result.get('stderr'):
                      ret['comment'] += '\n' + result['stderr']
                  return ret
              ret['comment'] = 'Task was deleted'
          ret['changes'][name] = 'deleted'
      else:
          ret['comment'] = 'Task does not exist'
  
      return ret
docs: Ensure that a task is absent from Kapacitor.
  
      name
          Name of the task.