[chef] Re: Why is my windows_package source attribute getting mucked up?


Chronological Thread 
  • From: Justin Dossey < >
  • To:
  • Subject: [chef] Re: Why is my windows_package source attribute getting mucked up?
  • Date: Fri, 6 Feb 2015 15:41:11 -0800

source needs to be a path to a local file.  Since you're instead giving it a URL, the resource provider interprets the URL as a path, which is (of course) wrong.  You could use remote_file to download the URL to a temporary location beforehand.

On Fri, Feb 6, 2015 at 12:29 PM, Fouts, Chris < " target="_blank"> > wrote:

I have the following resource

 

windows_package “Install App1” do

  source “{node.cookbook.package_url}”

  action :install

end

 

In my case, node.cookbook.package_url = http://file-server.domain.com/path/app1.msi

 

Chef chef-client run fails, and error message shows the source attribute as

“C:\\http:\\file-server-domain.com\\path\\app1.msi”

 

If I remove the windows_package and just use the log resource, I see the correct format. That is

 

log “{node.cookbook.package_url}”

 

I see

 

<date> INFO: http://file-server.domain.com/path/app1.msi

 

What am I missing?

 

Chris




--
Justin Dossey
Practice Owner
New Context Services, Inc



Archive powered by MHonArc 2.6.16.

§