How can you use variables in an array in Chef. I am trying to create multiple folder with an array. However my code does not work:
Code
variable1 = "/var/lib/temp"
variable2 = "/opt/chef/library"
%w{ #{variable1} #{variable2} }.each do |dir|
directory dir do
owner 'root'
group 'root'
mode '755'
recursive true
action :create
end
end