[chef] Stop multiple services


Chronological Thread 
  • From: < >
  • To:
  • Subject: [chef] Stop multiple services
  • Date: Sun, 14 Sep 2014 01:45:12 -0700 (PDT)

I have multiple services that I need to stop , my code is as below ,

ruby_block "stopsvc" do
        block do
                services = File.readlines("/root/svc")
                services.each do |svc|
                                        require
Chef::Provider::Service::Init::Redhat
                                        service "svc" do
                                        action [ :stop, :disable]
                                        end
                end
        end
end

"can't convert Class into String" is the error I am seeing . Please point what
I need ,



Archive powered by MHonArc 2.6.16.

§