Signed-off-by: Luke Kanies <[email protected]>
---
lib/puppet/type/file/content.rb | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/lib/puppet/type/file/content.rb b/lib/puppet/type/file/content.rb
index d571e46..ff71a55 100755
--- a/lib/puppet/type/file/content.rb
+++ b/lib/puppet/type/file/content.rb
@@ -36,6 +36,21 @@ module Puppet
end
end
+ # Checksums need to invert how changes are printed.
+ def change_to_s(currentvalue, newvalue)
+ # Our "new" checksum value is provided by the source.
+ unless source = resource.parameter(:source) and newvalue =
source.checksum
+ newvalue = "unknown checksum"
+ end
+ if currentvalue == :absent
+ return "defined content as '%s'" % [newvalue]
+ elsif newvalue == :absent
+ return "undefined content from '%s'" % [currentvalue]
+ else
+ return "content changed '%s' to '%s'" % [currentvalue,
newvalue]
+ end
+ end
+
def checksum_type
if source = resource.parameter(:source)
result = source.checksum
--
1.6.1
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---