def absent(name, database=None, user=None, password=None, host=None,
           port=None):
    ret = {'name': name,
           'changes': {},
           'result': True,
           'comment': ''}

    #check if user exists and remove it
    if __salt__['influxdb.user_exists'](
            name, database, user, password, host, port):
        if __opts__['test']:
            ret['result'] = None
            ret['comment'] = 'User {0} is present and needs to be removed'\
                .format(name)
            return ret
        if __salt__['influxdb.user_remove'](
                name, database, user, password, host, port):
            ret['comment'] = 'User {0} has been removed'.format(name)
            ret['changes'][name] = 'Absent'
            return ret
        else:
            ret['comment'] = 'Failed to remove user {0}'.format(name)
            ret['result'] = False
            return ret

    # fallback
    ret['comment'] = 'User {0} is not present, so it cannot be removed'\
        .format(name)
    return ret
Ensure that the named cluster admin or database user is absent.
dataset/ETHPy150Open saltstack/salt/salt/states/influxdb_user.py/absent