リソースのnotify句で属性値を使いたいです。最初にディレクトリを作成し、次に .zip を cookbook_file からそのディレクトリにコピーするコードを以下に記述しました。notify 句でエラーが発生します
notifies :create , 'cookbook_file["#{node['INSTALLDIR']}/#{node['INSTALLER']}"]', :immediately
cookbook_file "#{node['INSTALLDIR']}/#{node['INSTALLER']}" do
source "installer.zip"
mode 0755
owner "no"
group "admin"
action :nothing
notifies :install , 'apt_package[unzip]', :immediately
notifies :run , 'bash[extract]', :immediately
end
user 'no' do
comment 'User to run wso2 App Server'
password 'admin@123'
home '/home/no'
end
directory node['INSTALLDIR'] do
owner "no"
group "admin"
mode "0755"
action :create
notifies :create , 'cookbook_file["#{node['INSTALLDIR']}/#{node['INSTALLER']}"]', :immediately
end
apt_package 'unzip' do
action :install
end
apt_package 'openjdk-6-jdk' do
action :install
end
ありがとう