tomcat "jira" douser jira_useraction :installjvm_opts node['jira']['jvm_opts']end# define key template files
file "jira properties" do path "#{t.base}/webapps/jira/WEB-INF/classes/jira-application.properties" content <<-EOS# generated by Chef, don't touch!jira.home = /home/jiraEOSowner jira_userend
template "jdbc configuration" dopath "/home/jira/dbconfig.xml"source "dbconfig.xml.erb"owner jira_userend
# then reopen the tomcat resource at run_time to subscribe to the template files and start it# here is my wacky idea on how to do it w/ the fictitious run_time resourcerun_time "tomcat[jira]" dosubscribes :restart, resources(templates => ['jdbc configuration', 'jira properties'] ), :immediatelyaction :startend
I believe that I could accomplish most of the above w/ a ruby_block but frankly that's pretty ugly. There must be a better way. I would really love to use something like a run_time resource that allows me to re-open a resource much like on can extend a ruby object, however I want it to happen at run_time and not compile-time. thoughts?
Archive powered by MHonArc 2.6.16.