Skip to content

Commit 2d9d761

Browse files
author
jordanbreen28
committed
(bug) - Honour custom insync in noop mode
Prior to this commit, a custom insync message was not honoured when applying a manifest in noop mode. This was later tracked down the the `noop` method found in the resource harness class. I've updated the method to match that of the `sync` method below, ensuring that the functionality of the custom isync provider feature is not any different whether running puppet in noop or no-noop mode.
1 parent ca922ca commit 2d9d761

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lib/puppet/transaction/resource_harness.rb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,13 @@ def audit_message(param, do_audit, historical_value, current_value)
235235
end
236236

237237
def noop(event, param, current_value, audit_message)
238-
event.message = param.format(_("current_value %s, should be %s (noop)"),
239-
param.is_to_s(current_value),
240-
param.should_to_s(param.should)) + audit_message.to_s
238+
if param.sensitive
239+
event.message = param.format(_("current_value %s, should be %s (noop)"),
240+
param.is_to_s(current_value),
241+
param.should_to_s(param.should)) + audit_message.to_s
242+
else
243+
event.message = "#{param.change_to_s(current_value, param.should)}#{audit_message} (noop)"
244+
end
241245
event.status = "noop"
242246
end
243247

0 commit comments

Comments
 (0)