- From: Daniel DeLeo <
>
- To:
- Subject: [chef] Re: error in windows cookbook in windows platform
- Date: Fri, 9 May 2014 08:30:27 -0700
On Thursday, May 8, 2014 at 11:02 PM,
wrote:
>
>
hi,
>
>
>
i developed cookbook with chef windows resources like windows_batch,
>
windows_zip and etc. With the help of windows cookbook my cookbook was
>
executed.
>
some code in my cookbook like
>
>
windows_batch "get latest from TFS" do
>
cwd node['tfsscript_path']
>
code <<-EOH
>
tfsSchedule.exe
>
EOH
>
end
>
windows_zipfile "extract current deployment" do
>
source node['dest_currentDeploymentzip']
>
action :unzip
>
path node['extract_currentDeploymentcode']
>
not_if {::File.exists?(node['extract_currentDeploymentcode'])}
>
end
>
>
previously it was working fine but suddenly its shows error like below...
>
>
NoMethodError
>
-------------
>
No resource or method named `windows_zipfile' for `Chef::Recipe
>
"bitrefresh"'
>
>
No resource or method named `windows_batch' for `Chef::Recipe "bitrefresh"'
>
>
>
iam using hosted chef env and dependency cookbooks like windows, powershell
>
and
>
chef_handler for my own cookbook, Idont know how to resolve this??
>
>
>
Please share details hoe to resolve this...? Thanks in advance!!!!
>
>
>
Regards,
>
Ganesan.A
I would guess that your cookbook isn’t specifying a dependency on the windows
cookbook. You’ll want to add a `depends` statement.
http://docs.opscode.com/essentials_cookbook_metadata.html
--
Daniel DeLeo
Archive powered by MHonArc 2.6.16.