[chef] resource in a ruby_block?


Chronological Thread 
  • From: Jeremy Winters < >
  • To:
  • Subject: [chef] resource in a ruby_block?
  • Date: Thu, 17 Mar 2011 23:31:30 -0400
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=full360.com; s=google; h=from:content-type:content-transfer-encoding:subject:date:message-id :to:mime-version:x-mailer; b=GNE4eW6VDvaZuhKZHGVfCkwbJW9KoirgLcic9aG865fK6hfsHDdQ9t2un6HKk3foia ySbQ8PWSYkaZOkvw4PCg/pUYE6qxPaBa9CFsv+4AD3OxJ+pLDoizRlSHlc0VOp6amavu dZtfj34vHIiGfkRGSYf03s4dBCkKsfO2VK7sI=

I'm looking to do something like this...


ruby_block "do something doing convergence" do
        block do
                check_value=result_from_database_at_convergence_run_time
        
                if check_value==0 then
                        execute "run my sql script" do
                                cwd "path_to_script"
                                user "root"
                                command "./execute_sql_file.rb"
                        end
                end
        end
        only_if do primary_idempotent_condition==true end
end

is this possible?  am I missing something?

Jeremy Winters
212-202-0449 x1023







Archive powered by MHonArc 2.6.16.

§