[chef] Re: Re: Re: Re: Re: Re: Re: chef recipe does not fail on bash resource


Chronological Thread 
  • From: Daniel DeLeo < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: Re: Re: Re: chef recipe does not fail on bash resource
  • Date: Mon, 30 Sep 2013 15:19:57 -0700


On Monday, September 30, 2013 at 2:57 PM, Manoj Thakkar wrote:

Thanks Daniel,

wil this serve the purpose ? i understand what you are trying to say , but i am not sure the mix/match like this will work or not.

bash "install_bill" do
     cwd "#{node[:mule][:bin_dir]}"
     code <<-EOH
       ./deploy.sh -v x-billing-1.1.0-SNAPSHOT -e $env ebpi x-billing
       sleep 30
        echo " i am done deploying the app"
     EOH
     returns 0
    not_if { ::File.exists?(extract_path) }
      action :nothing
 end
This is the basic idea. If you intend to upgrade the x-billing-1.1.0-SNAPSHOT package and you need to re-run deploy.sh whenever that happens, you'll need to find a condition for not_if that will properly account for that. Also, you no longer should need `action :nothing`, as this bash resource will skip itself whenever "extract_path" exists.


-- 
Daniel DeLeo




Archive powered by MHonArc 2.6.16.

§