Skip to main content

InvalidNotificationResource

The department is: InvalidNotificationResource

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

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

    Was this page helpful?

    ×









    Search Results