[chef] Re: Re: Building directory path with directory resource


Chronological Thread 
  • From: Ranjib Dey < >
  • To:
  • Subject: [chef] Re: Re: Building directory path with directory resource
  • Date: Wed, 26 Jun 2013 09:05:00 -0700

Nice catch!

On Jun 26, 2013 8:55 AM, "Mike" < "> > wrote:
Here's the issue:

Your line:

directory "#{node['jboss']['jboss_home']}/#{node['jboss']['jboss_version']}" do

The line you probably want:

directory "#{node['jboss']['jboss_home']}/#{node['jboss']['version']}" do

-M

On Wed, Jun 26, 2013 at 11:49 AM, Mark H. Nichols < "> > wrote:
> All -
>
> I am trying to build a directory path by using attributes but it isn't
> working the way I expected.
>
> Here are the relevant attributes:
>
> default['jboss']['jboss_home'] = "/as/app/jboss"
> default['jboss']['version'] = "7.1.3"
> default['jboss']['jboss_user'] = "vagrant"
>
>
> And here is my directory resource code:
>
> directory "#{node['jboss']['jboss_home']}/#{node['jboss']['jboss_version']}"
> do
> owner node['jboss']['jboss_user']
> recursive true
> action :create
> end
>
>
> What I want is to have this path created:
>
> /as/app/jboss/7.1.3
>
>
> What I am getting is
>
> /as/app/jboss
>
>
> How do I append multiple attributes together in the directory resource?
>
> Thanks,
> Mark
>



Archive powered by MHonArc 2.6.16.

§