diff options
-rwxr-xr-x | lib/puppet/type/pfile/content.rb | 8 | ||||
-rwxr-xr-x | lib/puppet/type/pfile/source.rb | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/puppet/type/pfile/content.rb b/lib/puppet/type/pfile/content.rb index 48bf95537..20ad5d6a2 100755 --- a/lib/puppet/type/pfile/content.rb +++ b/lib/puppet/type/pfile/content.rb @@ -21,7 +21,13 @@ module Puppet [templating](/trac/puppet/wiki/PuppetTemplating)." def change_to_s - "synced" + should = "{md5}" + Digest::MD5.hexdigest(self.should) + if @is == :absent + return "created file with contents %s" % should + else + is = "{md5}" + Digest::MD5.hexdigest(@is) + return "changed file contents from %s to %s" % [is, should] + end end # We should probably take advantage of existing md5 sums if they're there, diff --git a/lib/puppet/type/pfile/source.rb b/lib/puppet/type/pfile/source.rb index 8416107a2..4622e966d 100755 --- a/lib/puppet/type/pfile/source.rb +++ b/lib/puppet/type/pfile/source.rb @@ -68,7 +68,7 @@ module Puppet end def change_to_s - "replacing from source %s" % @source + return "replacing from source %s with contents %s" % [@source, @stats[:checksum]] end def checksum |