Chef/Correctness/InvalidNotificationResource
The Cookstyle cops department: Chef/Correctness
| 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 |