Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><code>notifies</code> sends a notification for another Chef resource to do something.</p> <p>In your example, it's telling the resource <code>service[nginx]</code> to <code>:reload</code>. <code>service[nginx]</code> is a <a href="https://docs.chef.io/resource_service.html" rel="nofollow noreferrer"><code>service</code> resource</a> whose <code>name</code> is <code>nginx</code>.</p> <p>For this to work, <code>service[nginx]</code> must have been declared in your node's <code>run_list</code> at some point. Otherwise, Chef will throw an error. Usually this is either done manually in a recipe by the user, or via a dependency (say, the <a href="https://supermarket.chef.io/cookbooks/application" rel="nofollow noreferrer"><code>application</code></a>, or the <a href="https://supermarket.chef.io/cookbooks/nginx" rel="nofollow noreferrer"><code>nginx</code></a> cookbooks).</p> <p>Exactly how Chef runs the <code>reload</code> command depends on how the <code>service[nginx]</code> resource was declared, but it usually depends on the underlying operating system (that's one of the beauties of using a tool such as this -- it abstracts many lower level details away from you and allows you to use the same code across multiple platforms).</p> <p>In the <strong>Syntax</strong> section of the <code>service</code> documentation you find this:</p> <ul> <li>service tells the chef-client to use one of the following providers during the chef-client run: <code>Chef::Provider::Service::Init</code>, <code>Chef::Provider::Service::Init::Debian</code>, <code>Chef::Provider::Service::Upstart</code>, <code>Chef::Provider::Service::Init::Freebsd</code>, <code>Chef::Provider::Service::Init::Gentoo</code>, <code>Chef::Provider::Service::Init::Redhat</code>, <code>Chef::Provider::Service::Solaris</code>, <code>Chef::Provider::Service::Windows</code>, or <code>Chef::Provider::Service::Macosx</code>. The chef-client will detect the platform at the start of the run based on data collected by Ohai. After the platform is identified, the chef-client will determine the correct provider</li> </ul>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload