Make sure the user is not in the specified htpasswd file

    name
        User name

    htpasswd_file
        Path to the htpasswd file

    runas
        The system user to run htpasswd command with

def user_absent(name, htpasswd_file=None, runas=None):
    '''
    Make sure the user is not in the specified htpasswd file

    name
        User name

    htpasswd_file
        Path to the htpasswd file

    runas
        The system user to run htpasswd command with

    '''
    ret = {'name': name,
           'changes': {},
           'comment': '',
           'result': None}

    exists = __salt__['file.grep'](
        htpasswd_file, '^{0}:'.format(name))['retcode'] == 0

    if not exists:
        if __opts__['test']:
            ret['result'] = None
        else:
            ret['result'] = True
        ret['comment'] = 'User already not in file'
    else:
        if __opts__['test']:
            ret['result'] = None
            ret['comment'] = 'User \'{0}\' is set to be removed from htpasswd file'.format(name)
            ret['changes'] = {name: True}
        else:
            userdel_ret = __salt__['webutil.userdel'](
                htpasswd_file, name, runas=runas, all_results=True)

            ret['result'] = userdel_ret['retcode'] == 0
            ret['comment'] = userdel_ret['stderr']

            if ret['result']:
                ret['changes'] = {name: True}

    return ret