def remove_vdir(name, site, app='/'):
 ret = {'name': name, 'changes': {}, 'comment': str(), 'result': None}
 current_vdirs = __salt__['win_iis.list_vdirs'](site, app)
 if (name not in current_vdirs):
  ret['comment'] = 'Virtual directory has already been removed: {0}'.format(name)
  ret['result'] = True
 elif __opts__['test']:
  ret['comment'] = 'Virtual directory will be removed: {0}'.format(name)
  ret['changes'] = {'old': name, 'new': None}
 else:
  ret['comment'] = 'Removed virtual directory: {0}'.format(name)
  ret['changes'] = {'old': name, 'new': None}
  ret['result'] = __salt__['win_iis.remove_vdir'](name, site, app)
 return ret

def remove_vdir ( name , site , app = '/' ) : ret = { 'name' : name , 'changes' : { } , 'comment' : str ( ) , 'result' : None } current_vdirs = __salt__ [ 'win_iis.list_vdirs' ] ( site , app ) if ( name not in current_vdirs ) : ret [ 'comment' ] = 'Virtual directory has already been removed: {0}' . format ( name ) ret [ 'result' ] = True elif __opts__ [ 'test' ] : ret [ 'comment' ] = 'Virtual directory will be removed: {0}' . format ( name ) ret [ 'changes' ] = { 'old' : name , 'new' : None } else : ret [ 'comment' ] = 'Removed virtual directory: {0}' . format ( name ) ret [ 'changes' ] = { 'old' : name , 'new' : None } ret [ 'result' ] = __salt__ [ 'win_iis.remove_vdir' ] ( name , site , app ) return ret
remove an iis virtual directory .