diff options
Diffstat (limited to 'manifests/subsystem/sysctl')
-rw-r--r-- | manifests/subsystem/sysctl/entry.pp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/manifests/subsystem/sysctl/entry.pp b/manifests/subsystem/sysctl/entry.pp new file mode 100644 index 0000000..ddd6020 --- /dev/null +++ b/manifests/subsystem/sysctl/entry.pp @@ -0,0 +1,19 @@ +# Simple sysctl definition +define nodo::subsystem::sysctl::entry( + $ensure = present, + $value +) { + file { "/etc/sysctl.d/${name}.conf": + owner => "root", + group => "root", + mode => 0644, + ensure => $ensure, + content => "$name = $value\n", + } + + exec { "sysctl ${name}=${value}": + user => root, + subscribe => File["/etc/sysctl.d/${name}.conf"], + refreshonly => true, + } +} |