1 Puppet::Type.newtype(:sysctl) do
3 @doc = "Manages kernel parameters in /etc/sysctl.conf. By default this will
4 only edit the configuration file, and not change any of the runtime
5 values. If you wish changes to be activated right away, you can do
6 so with an exec like so:
9 command => \"/sbin/sysctl -p /etc/sysctl.conf\",
13 Set any changes you want to happen right away to notify this command,
14 or you can set it as the default:
17 notify => Exec[load-sysctl]
22 newparam(:name, :namevar => true) do
23 desc "Name of the parameter"
28 desc "Value the parameter should be set to"
31 newproperty(:target) do
32 desc "Name of the file to store parameters in"
33 defaultto { if @resource.class.defaultprovider and
34 @resource.class.defaultprovider.ancestors.include?(Puppet::Provider::ParsedFile)
35 @resource.class.defaultprovider.default_target