liuyuehua 发表于 2018-8-2 10:40:42

Puppet使用ENC报'Could not load external node results for'

def translate(name, output)  
    YAML.load(output).inject({}) do |hash, data|
  
      case data
  
      when String
  
      hash.intern] = data
  
      when Symbol
  
      hash] = data
  
      else
  
      raise Puppet::Error, "key is a #{data.class}, not a string or symbol"
  
      end
  

  
      hash
  
    end
  

  
rescue => detail
  
      raise Puppet::Error, "001,Could not load external node results for #{name}: #{detail} ::#{output} "
  
end
页: [1]
查看完整版本: Puppet使用ENC报'Could not load external node results for'