[chef] Re: run chef_recipe inside the chef resources


Chronological Thread 
  • From: Mrigesh Priyadarshi < >
  • To:
  • Subject: [chef] Re: run chef_recipe inside the chef resources
  • Date: Fri, 3 Oct 2014 20:09:05 +0530

Hey Ganesan,

You dont need ruby block to do that until you are using it for notification from other resource.

You can directly use if else block and call include recipe for eg.
runcontext.include_recipe "rollback::stopservices"

On Sep 18, 2014 6:21 PM, < "> > wrote:

HI,


I need to run chef_recipe inside the chef resources like


ruby_block "XXXXXXX" do
block do
f $inc == 1 then
            puts "call rollback method!"
            include_recipe "rollback::stopservices"
            else
            puts "No need to call rollback method!"
        end
end
end

but its shows error, I need to know it is possible to call chef recipe from any
chef resources in one recipe?
and how can I call one chef resources from  another chef resource? same or diff
resources???


Thanks in advance


Regards,
ganesan.A



Archive powered by MHonArc 2.6.16.

§