more ordering
[mirror/dsa-puppet.git] / modules / site / manifests / sysctl.pp
1 define site::sysctl ($key, $value, $target=Linux, $ensure = present) {
2         include site
3         case $ensure {
4                 present: {}
5                 absent:  {}
6                 default: { fail ( "Unknown ensure value: '$ensure'" ) }
7         }
8
9         if $::kernel == $target {
10                 file {
11                         "/etc/sysctl.d/${name}.conf":
12                                 ensure  => $ensure,
13                                 owner   => root,
14                                 group   => root,
15                                 mode    => '0644',
16                                 content => "${key} = ${value}\n",
17                                 notify  => Service['procps']
18                 }
19         }
20 }