cjmling / findings

Notes on stuff i finds worth keeping for quick reference later on.
2 stars 0 forks source link

Chef run a resource when another resource change using notification #228

Open cjmling opened 4 years ago

cjmling commented 4 years ago

Sending and receiving notification tutorial : https://www.udemy.com/course/chef-fundamentals-a-recipe-for-automating-infrastructure/learn/lecture/6245450#questions/8570794

Let say we want to restart the apache service when one of the apache configuration file changed. We can do something like this ( assuming index.html is some important apache configuration file. )

Screen Shot 2562-12-04 at 3 44 44 PM

Once the content of the index.html is changed by us manually or by other mean , it will send notification to httpd resouce that it need to restart.

SEO : notifies subscribes immediately delay timer

cjmling commented 4 years ago

We can also do it other way round too

Screen Shot 2562-12-04 at 3 50 52 PM