InvalidNotificationResource
The department is: InvalidNotificationResource
The full name of the cop is: Chef/Correctness/InvalidNotificationResource
Enabled by default | Supports autocorrection | Target Chef Version |
---|---|---|
Enabled | No | All 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
Name | Default value | Configurable values |
---|---|---|
Version Added | 7.28 | String |
Include | Array |