You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I am trying to use notifies from within rvm_shell but having trouble.
For example:
ruby_block "a block" do
block do
Chef::Log.info("my block ran")
end
action :nothing
end
rvm_shell "a command" do
code "echo foobar"
notifies :create, "ruby_block[a block]", :immediately
end
results in the output:
[Thu, 26 Jan 2012 00:49:14 -0800] INFO: Starting Chef Run (Version 0.9.12)
[Thu, 26 Jan 2012 00:50:07 -0800] INFO: Ran script[a command] successfully
[Thu, 26 Jan 2012 00:50:08 -0800] INFO: Chef Run complete in 14.732362 seconds
[Thu, 26 Jan 2012 00:50:08 -0800] INFO: cleaning the checksum cache
[Thu, 26 Jan 2012 00:50:09 -0800] INFO: Running report handlers
[Thu, 26 Jan 2012 00:50:09 -0800] INFO: Report handlers complete
The text was updated successfully, but these errors were encountered:
Looks like I've neglected to set new_resource.updated_by_last_action(true) in all the LWRPs. I'll need to fix each of these which should solve the resource notifications. Thank you Foodcritic
If this is still an issue please reopen or open another issue. Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help!
Hi,
I am trying to use notifies from within rvm_shell but having trouble.
For example:
ruby_block "a block" do
block do
Chef::Log.info("my block ran")
end
end
rvm_shell "a command" do
code "echo foobar"
notifies :create, "ruby_block[a block]", :immediately
end
results in the output:
[Thu, 26 Jan 2012 00:49:14 -0800] INFO: Starting Chef Run (Version 0.9.12)
[Thu, 26 Jan 2012 00:50:07 -0800] INFO: Ran script[a command] successfully
[Thu, 26 Jan 2012 00:50:08 -0800] INFO: Chef Run complete in 14.732362 seconds
[Thu, 26 Jan 2012 00:50:08 -0800] INFO: cleaning the checksum cache
[Thu, 26 Jan 2012 00:50:09 -0800] INFO: Running report handlers
[Thu, 26 Jan 2012 00:50:09 -0800] INFO: Report handlers complete
The text was updated successfully, but these errors were encountered: