[chef] Re: resource dependency for running bash


Chronological Thread 
  • From: Kannan Manickam < >
  • To:
  • Subject: [chef] Re: resource dependency for running bash
  • Date: Tue, 10 Sep 2013 23:59:52 -0700

Manoj,

You should use Resource Notifications (http://docs.opscode.com/resource_common.html#notifications) so the bash block resource gets executed only if the content of the remote file is changed. You can see samples in the page I mentioned above.

-
Kannan.


On Tue, Sep 10, 2013 at 9:35 PM, Manoj Thakkar < " target="_blank"> > wrote:
Hi All,

I have a recipe which copies a remote file and then run a shell script,

The issue is that even if there is no new file added in the remote location , when i run chef client it runs the bash script.

How do i add the dependency on that file resource for that bash script , so that the script is not run if the file copied is not a new one.

Thanks
Manoj





Archive powered by MHonArc 2.6.16.

§