def user_absent(name, channel=14, **kwargs):
 ret = {'name': name, 'result': False, 'comment': '', 'changes': {}}
 user_id_list = __salt__['ipmi.get_name_uids'](name, channel, **kwargs)
 if (len(user_id_list) == 0):
  ret['result'] = True
  ret['comment'] = 'user already absent'
  return ret
 if __opts__['test']:
  ret['comment'] = 'would delete user(s)'
  ret['result'] = None
  ret['changes'] = {'delete': user_id_list}
  return ret
 for uid in user_id_list:
  __salt__['ipmi.delete_user'](uid, channel, **kwargs)
 ret['comment'] = 'user(s) removed'
 ret['changes'] = {'old': user_id_list, 'new': 'None'}
 return ret

def user_absent ( name , channel = 14 , ** kwargs ) : ret = { 'name' : name , 'result' : False , 'comment' : '' , 'changes' : { } } user_id_list = __salt__ [ 'ipmi.get_name_uids' ] ( name , channel , ** kwargs ) if ( len ( user_id_list ) == 0 ) : ret [ 'result' ] = True ret [ 'comment' ] = 'user already absent' return ret if __opts__ [ 'test' ] : ret [ 'comment' ] = 'would delete user(s)' ret [ 'result' ] = None ret [ 'changes' ] = { 'delete' : user_id_list } return ret for uid in user_id_list : __salt__ [ 'ipmi.delete_user' ] ( uid , channel , ** kwargs ) ret [ 'comment' ] = 'user(s) removed' ret [ 'changes' ] = { 'old' : user_id_list , 'new' : 'None' } return ret
remove user delete all user records having the matching name .