-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use sysctl 1.0 #210
use sysctl 1.0 #210
Conversation
bca29e7
to
293c181
Compare
most of the code was already written by symondsandson https://github.com/symondsandson/chef-os-hardening.git remove the sysctl attributes file - values are now set in the recipe remove the lazy evaluation from symondsandson adapt test cases to test usage of sysctl_param resource
@artem-sidorenko @chris-rock Thanks for your great work! |
Looks great @dhohengassner I'm waiting on this one before applying this to our systems so feedback from @chris-rock or other maintainers would be much appreciated! |
This is huge @dhohengassner Thank you. Once question that I have. Can you still override the the attributes? |
Thanks for the fast response @chris-rock Good point! At the moment we can set the flags to enable/disable features as before. I think it would be good to use the same attributes the old sysctl cookbook used to set the values. |
Nice, thank you @dhohengassner That sounds like the perfect approach. |
@dhohengassner I‘m currently on the parental leave, I hope @chris-rock can review here |
This should be done to ensure downward compatibility and keep flexibility. See discussion on: dev-sec#210
@chris-rock I reverted my resource calls and copied now parts of the old sysctl recipe into this cookbook. Please review these changes. Thank you! |
This is an important fix for Chef 14 compatibility and it would be great to get this merged in as soon as possible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @dhohengassner for this improvement
# include sysctl recipe and set /etc/sysctl.d/99-chef-attributes.conf | ||
include_recipe 'sysctl::apply' | ||
if node.attribute?('sysctl') && node['sysctl'].attribute?('params') | ||
coerce_attributes(node['sysctl']['params']).each do |x| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
this means to remove the recipe used until now and use the ressource from sysctl
most of the code was already written by symondsandson
https://github.com/symondsandson/chef-os-hardening.git