Skip to content

Commit 38d755b

Browse files
committed
(PUP-12023) Add option for disabling catalog messages
Add's a new Puppet setting, skip_logging_catalog_request_destination, which defaults to false and if set to true when the catalog is compiled Puppet will not output which server supplied the used catalog.
1 parent 500c601 commit 38d755b

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

Diff for: lib/puppet/defaults.rb

+6
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,12 @@ def self.initialize_default_settings!(settings)
172172
end
173173
end
174174
},
175+
:skip_logging_catalog_request_destination => {
176+
:default => false,
177+
:type => :boolean,
178+
:desc => "If you wish to suppress the notice of which compiler supplied the
179+
catalog",
180+
},
175181
:merge_dependency_warnings => {
176182
:default => false,
177183
:type => :boolean,

Diff for: lib/puppet/indirector/catalog/rest.rb

+7-5
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@ def find(request)
1616
session = Puppet.lookup(:http_session)
1717
api = session.route_to(:puppet)
1818

19-
ip_address = begin
20-
" (#{Resolv.getaddress(api.url.host)})"
21-
rescue Resolv::ResolvError
22-
nil
19+
unless Puppet.settings[:skip_logging_catalog_request_destination]
20+
ip_address = begin
21+
" (#{Resolv.getaddress(api.url.host)})"
22+
rescue Resolv::ResolvError
23+
nil
24+
end
25+
Puppet.notice("Requesting catalog from #{api.url.host}:#{api.url.port}#{ip_address}")
2326
end
24-
Puppet.notice("Requesting catalog from #{api.url.host}:#{api.url.port}#{ip_address}")
2527

2628
_, catalog = api.post_catalog(
2729
request.key,

0 commit comments

Comments
 (0)