Skip to main content

Chef/Correctness/InvalidNotificationResource

Cookstyle cops page

The Cookstyle cops department: Chef/Correctness

Enabled by defaultSupports autocorrectionTarget Chef Version
EnabledNoAll Versions

The resource to notify when calling notifies or subscribes must be a string.

Examples

incorrect


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

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

correct


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

Configurable attributes

NameDefault valueConfigurable values
Version Added7.28String
Include
    Array

    Thank you for your feedback!

    ×









    Search Results