Interface for reading in a Nagios config file.
41 42 43 44 45
# File 'core_modules/nagios_core/lib/puppet/external/nagios.rb', line 41 def self.each Nagios::Object.objects.each do |object| yield object end end
29 30 31 32 33 34 35 36 37 38 39
# File 'core_modules/nagios_core/lib/puppet/external/nagios.rb', line 29 def self.import(config) text = '' File.open(config) do |file| file.each do |line| text += line end end parser = Nagios::Parser.new parser.parse(text) end