Skip to content

Instantly share code, notes, and snippets.

@cheeseplus
Created June 30, 2015 22:32
Show Gist options
  • Save cheeseplus/49840895b783a756ad1f to your computer and use it in GitHub Desktop.
Save cheeseplus/49840895b783a756ad1f to your computer and use it in GitHub Desktop.
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