Last active
September 2, 2015 08:57
-
-
Save stevendanna/aa66d66c222b6587cca6 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
file "bar" | |
file "baz" | |
log "foo" do | |
only_if do | |
resources("file[bar]").updated || | |
resources("file[baz]").updated | |
end | |
end |
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
node.default["whatever_needs_restart"] = false | |
file "bar" do | |
notifies :run, "ruby_block[whatever_needs_restart]", :immediately | |
end | |
file "baz" do | |
notifies :run, "ruby_block[whatever_needs_restart]", :immediately | |
end | |
ruby_block "whatever_needs_restart" do | |
block do | |
node.default["whatever_needs_restart"] = true | |
end | |
action :nothing | |
end | |
log "restart something" do | |
only_if do | |
node.default["whatever_needs_restart"] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment