Issue #5065 has been updated by Markus Roberts.
Category set to documentation
Status changed from Investigating to Accepted
According to Luke:
<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:
<code>
file { "/tmp/bar": audit => content }
exec { '/usr/bin/true': refreshonly => true, subscribe => File['/tmp/bar'] }
</code>
So this is a documentation issue.
</blockquote>
----------------------------------------
Bug #5065: subscribe/notify w/o managing content via checksum is broken
https://projects.puppetlabs.com/issues/5065
Author: Jascha Lee
Status: Accepted
Priority: Normal
Assignee:
Category: documentation
Target version:
Affected Puppet version: 2.6.2
Keywords:
Branch:
According to the doc
(http://docs.puppetlabs.com/references/0.24.5/type.html#file): Checksum "can
also be used to monitor files ... without managing the file contents in any
way. You can specify that a file’s checksum should be monitored and then
subscribe to the file from another object"
However, this does not work:
/etc/puppet/manifests/site.pp:
<pre>
import "nodes"
class mrepo {
file { "/tmp/runmrepo":
checksum => timestamp, # or md5, it doesn't matter
}
exec { "/bin/date":
cwd => "/tmp",
subscribe => File["/tmp/runmrepo"],
refreshonly => true,
}
}
</pre>
/etc/puppet/manifests/nodes.pp:
<pre>
node default {
include mrepo
}
</pre>
whack provided this workaround (http://pastebin.com/vHy0e5eP):
add:
<pre>
source => /some/other/file
</pre>
and then modify /some/other/file to get the exec to fire. Note also that
touching the other file does not trigger the exec, though checksum => timestamp
implies it should.
--
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.