[chef] Re: Chef Notify Before?


Chronological Thread 
  • From: Ranjib Dey < >
  • To:
  • Subject: [chef] Re: Chef Notify Before?
  • Date: Wed, 13 Mar 2013 06:20:49 -0700

not directly . In chef resource are executed in the same order as you specify them. Given you want the package and the package depends on the file, you should specify the file resource just before the package. What is important is your file resource is idempotent. That will make the entire recipe way more simpler and readable, i.e. windows_batch "vs_20120" should have action create, but also a decent not_if/only_if guard so that it does not get executed directly.





On Wed, Mar 13, 2013 at 5:03 AM, Gibbons, Daniel (RBI-UK) < " target="_blank"> > wrote:

Hi,

 

I’m just working on a recipe and what I’d like to be able to do is if a package isn’t installed it should go and get the required files before running, something like:

 

windows_batch "unzip_vs2010" do
  code <<-EOH
  "#{zippath}" x "#{vs2010_iso_location}" -o#{vs2010_extraction_path} -r -y
  EOH
  action: nothing
end
 

windows_package "#{node['vs-2010']['base-display-name'] }" do

  source "#{vs2010setup}"

  options "/q /norestart /unattendfile \"#{unattendini}\""

  installer_type :custom

  action :install

  notifies :run, 'windows_batch[unzip_vs2010]', :before

end

 

Is there an easy way to do this?

 

Thanks

 

Dan

 

===================== DISCLAIMER ======================
This message is intended only for the use of the person(s)
("Intended Recipient") to whom it is addressed. It may contain
information which is privileged and confidential. Accordingly
any dissemination, distribution, copying or other use of this
message or any of its content by any person other than the Intended
Recipient may constitute a breach of civil or criminal law and is
strictly prohibited. If you are not the Intended Recipient, please
contact the sender as soon as possible.

Reed Business Information Limited.
Registered Office: Quadrant House, The Quadrant, Sutton, Surrey, SM2 5AS, UK.
Registered in England under Company No. 151537

=======================================================





Archive powered by MHonArc 2.6.16.

§