Created
June 30, 2015 22:32
-
-
Save cheeseplus/49840895b783a756ad1f 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
unless node['chef_client'].nil? or node['chef_client']['tomcat_restart'].nil? | |
ruby_block "Check if Tomcat need to restart" do | |
block do | |
if node['chef_client']['tomcat_restart'] != 0 | |
node.normal['chef_client']['tomcat_restart'] = node['chef_client']['tomcat_restart'] - 1 | |
resources(:service => "tomcat6").run_action(:restart) | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment