I think it makes more sense to use a sysctl cookbook like https://github.com/tboerger/chef-sysctl :)