[chef] Re: Chef FATAL: ArgumentError: You must have a string like resource_type[name]!


Chronological Thread 
  • From: Ranjib Dey < >
  • To:
  • Subject: [chef] Re: Chef FATAL: ArgumentError: You must have a string like resource_type[name]!
  • Date: Thu, 31 Oct 2013 13:10:52 -0700

hi manoj
you can use pry  to debug such issues[1]. Issues you are facing are trivial, and more to do with ruby than to do with chef. In the current example, if i was you I would install pry in the chef gemset, require it in the recipe and then invoke binding.pry right before the notifies call. Once im dropped inside the pry shell, print the value of  base_name (or whatever variable/method call thats causing trouble). This will help you much faster, and beyond chef.

also, next time you seek help, send the trace/ debug log etc. Dont use the mailing list as an REPL


On Thu, Oct 31, 2013 at 1:02 PM, Manoj Thakkar < " target="_blank"> > wrote:
Hi,

I am facing this weird issue in one of the recipes i know why the issue comes in , i dont know how to fix it

this is what i have

node[acc_deploy]=acc1,acc2

and then 

node['acc_deploy'].each do |base_name|
....
....
...

notifies :run, "bash[inst_tcat_#{base_name}]", :immediately
end


looks like the notifies did not like base_name the way i am using it, please advise how to fix this.

Thanks
Manoj






Archive powered by MHonArc 2.6.16.

§