Skip to main content

InvalidNotificationTiming

All Cookstyle Cops


The department is: Chef/Correctness

The full name of the cop is: Chef/Correctness/InvalidNotificationTiming


Enabled by defaultSupports autocorrectionTarget Chef Version
EnabledNoAll Versions

Valid notification timings are :immediately, :immediate (alias for :immediately), :delayed, and :before.

Examples

incorrect


template '/etc/www/configures-apache.conf' do
  notifies :restart, 'service[apache]', :nope
end

correct


template '/etc/www/configures-apache.conf' do
  notifies :restart, 'service[apache]', :immediately
end

Configurable attributes

NameDefault valueConfigurable values
Version Added5.16.0String
Exclude
  • **/attributes/*.rb
  • **/metadata.rb
  • **/Berksfile
Array

Was this page helpful?