def absent(name):
    '''
    Ensure a user does not exist on the Dell DRAC

    name:
        The users username
    '''
    ret = {'name': name,
           'result': True,
           'changes': {},
           'comment': ''}

    users = __salt__['drac.list_users']()

    if __opts__['test']:
        if name in users:
            ret['comment'] = '`{0}` is set to be deleted'.format(name)
            ret['changes'] = {name: 'will be deleted'}
        else:
            ret['comment'] = '`{0}` does not exist'.format(name)

        return ret

    if name in users:
        if __salt__['drac.delete_user'](name, users[name]['index']):
            ret['comment'] = '`{0}` deleted'.format(name)
            ret['changes'] = {name: 'deleted'}
        else:
            ret['comment'] = 'Unable to delete user'
            ret['result'] = False
    else:
        ret['comment'] = '`{0}` does not exist'.format(name)

    return ret
dataset/ETHPy150Open saltstack/salt/salt/states/drac.py/absent/original