On Wed, Feb 29, 2012 at 9:53 AM, Bryan Berry < "> > wrote:
> I have an issue where I need to provide values generated dynamically by oneThe ivy provider should be able to retrieve the tomcat resource by
> resource to resources that follow it
>
> My 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 directory
>
>
> include_recipe "ark"
>
> include_recipe "tomcat::base"
>
> include_recipe "ivy"
>
>
>
> t = tomcat "jira" do
>
> user node['jira']['user']
>
> action :install
>
> end
>
>
>
>
> # get mysql connector
>
> ivy "mysql-connector-java" do
>
> groupId "mysql"
>
> version "5.1.18"
>
> dest "#{t.base}/lib" # evaluates to "/lib"
>
>
> end
name, and then access any attribute.
So something like this:
ivy "mysql" do
groupId "mysql"
version "5.1.18"
base_resource :tomcat => "jira"
end
And then in the ivy provider do:
parent = resources(new_resource.base_resource)
parent.base
That's off the top of my head so YMMV
Andrea
Archive powered by MHonArc 2.6.16.