82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
# File 'lib/vendor/puppet/application/inspect.rb', line 82
def setup
exit(Puppet.settings.print_configs ? 0 : 1) if Puppet.settings.print_configs?
raise "Inspect requires reporting to be enabled. Set report=true in puppet.conf to enable reporting." unless Puppet[:report]
@report = Puppet::Transaction::Report.new("inspect")
Puppet::Util::Log.newdestination(@report)
Puppet::Util::Log.newdestination(:console) unless options[:logset]
Signal.trap(:INT) do
$stderr.puts "Exiting"
exit(1)
end
if options[:debug]
Puppet::Util::Log.level = :debug
elsif options[:verbose]
Puppet::Util::Log.level = :info
end
Puppet::Transaction::Report.indirection.terminus_class = :rest
Puppet::Resource::Catalog.indirection.terminus_class = :yaml
end
|