It just knows....
When you modify a config file for a service add this parameter:
It will restart the service for you, knowing the kernel and version you are using to do it properly.
One or more resources that depend on this resource, expressed as resource references. Multiple resources can be specified as an array of references. When this attribute is present:
This resource will be applied before the notified resource(s).
If Puppet makes changes to this resource, it will cause all of the notified resources to refresh. (Refresh behavior varies by resource type: services will restart, mounts will unmount and re-mount, etc. Not all types can refresh.)
This is one of the four relationship metaparameters, along with before, require, and subscribe. For more context, including the alternate chaining arrow (-> and ~>) syntax, see the language page on relationships.