Created
December 10, 2014 14:35
-
-
Save nacx/bff7211d4bd81cef6bd0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
With Chef 12 | |
------------ | |
$ chef-apply subscribes.rb | |
Recipe: (chef-apply cookbook)::(chef-apply recipe) | |
* log[subscribed-log] action nothing (skipped due to action :nothing) | |
* yum_package[nano] action install | |
- install version 2.0.9-7.el6 of package nano | |
(Note that the logger has not been triggered after installing the package | |
With Chef 11 | |
------------ | |
$ chef-apply subscribes.rb | |
Recipe: (chef-apply cookbook)::(chef-apply recipe) | |
* log[subscribed-log] action nothing (skipped due to action :nothing) | |
* package[nano] action install | |
- install version 2.0.9-7.el6 of package nano | |
* log[subscribed-log] action write | |
(Note that with Chef 11 subscription works as expected) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
log "subscribed-log" do | |
message "This is a subscribed log message" | |
action :nothing | |
subscribes :write, "package[nano]", :immediately | |
end | |
package "nano" do | |
action :install | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment