- From: Joshua Timberman <
>
- To:
- Subject: [chef] Re: Re: resource in a ruby_block?
- Date: Fri, 18 Mar 2011 01:58:58 -0600
Ohai!
On Thu, Mar 17, 2011 at 9:47 PM, Jeremy Winters
<
>
wrote:
>
the problem is that the idempotent condition determines whether or not to
>
run the ruby_block... but the decision to run the execute resource can only
>
be determined during convergence... and not during the compilation phase...
>
as the data in the database is changed in an earlier step during
>
convergence.
If whatever updating the data in the database is a resource, you can
notify the execute.
Supposing it is an execute resource that runs some command that
updates the database:
execute "thing that updates database" do
notifies :run, "execute[run my sql script"
end
execute "run my sql script" do
cwd "path_to_script"
user "root"
command "./execute_sql_file.rb"
action :nothing
end
--
Opscode, Inc
Joshua Timberman, Technical Evangelist
IRC, Skype, Twitter, Github: jtimberman
Archive powered by MHonArc 2.6.16.