Issue #5457 has been updated by Hal Snyder.

Tested on 2.6.next as of commit 609ddcf2b1ae0c835973a584ac20796d962334f6 with 

nodes.pp
    node default {
      include mrepo
    }
site.pp
    import "nodes"

    class mrepo {
           file { "/tmp/runmrepo":
                   audit => content,
           }

            exec { "/bin/date":
                    cwd => "/tmp",
                    subscribe => File["/tmp/runmrepo"],
                    refreshonly => true,
            }
    }

output
    info: Applying configuration version '1299323378'
    notice: /Stage[main]/Mrepo/File[/tmp/runmrepo]/content: audit change: 
previously recorded value {md5}8fc6e51fb2be9d5a721bd9d554244449 has been 
changed to {md5}5e5632d7679592067c23e0010afb8d50
    info: /Stage[main]/Mrepo/File[/tmp/runmrepo]: Scheduling refresh of 
Exec[/bin/date]
    notice: /Stage[main]/Mrepo/Exec[/bin/date]: Triggered 'refresh' from 1 
events
    notice: Finished catalog run in 0.07 seconds

appears fixed
(checked during Chi Puppet hackathon 2011-03-05 with J. Helwig)

----------------------------------------
Bug #5457: file content audit does not work
https://projects.puppetlabs.com/issues/5457

Author: Alex D
Status: Accepted
Priority: High
Assignee: 
Category: 
Target version: 
Affected Puppet version: 
Keywords: 
Branch: 


http://projects.puppetlabs.com/issues/5065 is marked as a documentation issue, 
but it looks like it isn't just a documentation bug. File content audit does 
not seem to work. 

<blockquote>
It is supposed to work that way, kind of - this behaviour changed recently and 
the docs apparently haven't been updated. The correct way to do this is now: 
file { "/tmp/bar": audit => content } exec { '/usr/bin/true': refreshonly => 
true, subscribe => File['/tmp/bar'] } So this is a documentation issue.
</blockquote> 

We've tested it on 2.6.* up to 2.6.4 and it gives the following error:

    err: /Stage[main]//File[/tmp/bar]: Could not evaluate: Could not retrieve 
content for {md5}d404401c8c6495b206fc35c95e55a6d5 from filebucket: File not 
found at /etc/puppet/manifests/site.pp:1
    notice: /Stage[main]//Exec[/usr/bin/true]: Dependency File[/tmp/bar] has 
failures: true
    warning: /Stage[main]//Exec[/usr/bin/true]: Skipping because of failed 
dependencies
    notice: Finished catalog run in 3.74 seconds

File /tmp/bar exists on the node, we put some random content in that file for 
our tests.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" 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-bugs?hl=en.

Reply via email to