owner "root"
group "root"
mode 0644
- notifies :run, resources(:execute => "sysctl")
+ notifies :run, "execute[sysctl]"
end
node[:sysctl].each_value do |group|
- group[:parameters].each do |key,value|
+ group[:parameters].each do |key, value|
sysctl_file = "/proc/sys/#{key.gsub('.', '/')}"
file sysctl_file do
content "#{value}\n"
atomic_update false
- only_if { File.exists?(sysctl_file) }
+ only_if { File.exist?(sysctl_file) }
end
end
end