Hi,I am looking for some good example for chef definition, or may be someone can help me change my recipe in to a definition so that i can use it in any recipe.
* this is the use case , i have this tomcat web deployment for 10+ wars since the deployment mechanism remains the same for every war i think a definition is the right thing to do, correct me if i am wronghere is my recipe .Please help change it to a definition and a use case on how to sue itcookbook_file "#{node[:tcat][:base_dir]}/webapps/#{node[:tcat][:war_name]}.war" dosource "#{node[:tcat][:war_name]}-#{node[:file][:version]}.war"mode 0777owner "deploy"group "deploy"endremote_file "#{node[:tcat][:base_dir]}/#{node[:tcat][:env]}-config.zip" domode '777'owner "deploy"notifies :run, "bash[unzip_file]", :immediatelyendbash "unzip_file" docwd "#{node[:tcat][:base_dir]}"code <<-EOSpwdunzip "#{node[:tcat][:env]}-config.zip"EOSaction :nothingendlink "#{node[:tcat][:base_dir]}/cas-config" doto "#{node[:tcat][:env]}-config"end
Archive powered by MHonArc 2.6.16.