[chef] remote_file resource -- new to Chef


Chronological Thread 
  • From: mark bradley < >
  • To: chef < >
  • Subject: [chef] remote_file resource -- new to Chef
  • Date: Mon, 13 Feb 2012 15:03:27 -0500

Hi, I'm trying to copy a file on change (both files are in /tmp for now):

default["FOO"]["latest_war"] = "/tmp/app.war"
default["FOO"]["target_war"] = "/tmp/dest.war"

My resource specification looks like this:

remote_file node.default["FOO"]["target_war"] do
  action :create
  source node.default["FOO"]["latest_war"]
end


When I run the Chef client I get an error:

[Mon, 13 Feb 2012 19:55:09 +0000] FATAL: Chef::Exceptions::FileNotFound: remote_file[/tmp/dest.war] (XX line 65) had an error: Chef::Exceptions::FileNotFound: Cookbook 'XX' (0.0.1) does not contain a file at any of these locations:
  files/amazon-2011.09//tmp/app.war
  files/amazon//tmp/app.war
  files/default//tmp/app.war

Is there a way of forcing remote_file to look outside the cookbook? Have I misunderstood this resource? Is there a better one to use?

Thanks,
Mark



Archive powered by MHonArc 2.6.16.

§