我正在尝试将变量deploy[:deploy_to]
插入到我的速记数组中。
node[:deploy].each do |application, deploy|
%w[ #{deploy[:deploy_to]}/current/cache
#{deploy[:deploy_to]}/current/public/projects_icons ].each do |path|
directory path do
user deploy[:user]
group deploy[:group]
mode "0777"
end
end
end
我该怎么做?
答案 0 :(得分:0)
%W
支持插值:
%W[ #{deploy[:deploy_to]}/current/cache
#{deploy[:deploy_to]}/current/public/projects_icons ].each do |path|
directory path do
user deploy[:user]
group deploy[:group]
mode "0777"
end
end