I have an issue where I need to provide values generated dynamically by one resource to resources that follow itMy tomcat lwrp generates a base directory for each new instance that is a readable attribute "base"Following resources will use that base attribute. In this example, the ivy resource should place a .jar file in the #{base}/lib directoryinclude_recipe "ark"include_recipe "tomcat::base"include_recipe "ivy"t = tomcat "jira" douser node['jira']['user']action :installend# get mysql connectorivy "mysql-connector-java" dogroupId "mysql"version "5.1.18"dest "#{t.base}/lib" # evaluates to "/lib"endruby_block "foobarbaz" doblock doChef::Log.debug("t.base is #{t.base}") # t.base evaluates to "/usr/local/tomcat/jira"endendI have found a solution thanks to Jorge Espada, but there really should be a more straightforward way to do this.t = tomcat "jira" douser node['jira']['user']action :nothingendt.run_action :install
Archive powered by MHonArc 2.6.16.