Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
sysctl Mash.new unless attribute?("sysctl")
execute "sysctl" do
command "sysctl -n -e -q -p"
action :nothing
end
template "/etc/sysctl.conf" do
source "sysctl.conf.erb"
mode 0644
owner "root"
group "root"
variables( :sysctl => node[:sysctl] )
notifies :run, resources(:execute => "sysctl")
end
# Managed by chef
<% if @sysctl.length > 0 %>
<% @sysctl.each do |k,v| %>
<%= k %> = <%= v %>
<% end %>
<% end %>
define :sysctl do
key = params[:name]
@node[:sysctl][key] = params[:value]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.