Puppet: System Administration Automated

Support

Ticket #484: unknown_config_vars.patch

File unknown_config_vars.patch, 1.1 kB (added by puppet, 2 years ago)
  • config.rb

    old new  
    3939            param = symbolize(param) 
    4040            unless @config.include?(param) 
    4141                raise Puppet::Error, 
    42                     "Unknown configuration parameter %s" % param.inspect 
     42                    "Attempt to assign a value to unknown configuration parameter %s" % param.inspect 
    4343            end 
    4444            unless @order.include?(param) 
    4545                @order << param 
     
    300300                    next 
    301301                end 
    302302 
     303                # JJM: Only warn if we don't know what this config var is. 
     304                #      This prevents exceptions later on. 
     305                unless @config.include?(var) 
     306                    Puppet.warning "Discarded unknown configuration parameter %s" % var.inspect 
     307                    next # Skip this line. 
     308                end 
     309 
    303310                # Don't override set parameters, since the file is parsed 
    304311                # after cli arguments are handled. 
    305312                unless @config.include?(var) and @config[var].setbycli