try again, with puppetforge modules, correctly included now
[mirror/dsa-puppet.git] / 3rdparty / modules / sysctl / manifests / value.pp
1 # Manage sysctl value
2 #
3 # It not only manages the entry within
4 # /etc/sysctl.conf, but also checks the
5 # current active version.
6 #
7 # Parameters
8 #
9 # * value: to set.
10 # * key Key to set, default: $name
11 # * target: an alternative target for your sysctl values.
12 define sysctl::value (
13   $value,
14   $key    = $name,
15   $target = undef,
16 ) {
17   require sysctl::base
18   $val1 = inline_template("<%= String(@value).split(/[\s\t]/).reject(&:empty?).flatten.join(\"\t\") %>")
19
20   sysctl { $key :
21     val    => $val1,
22     target => $target,
23     before => Sysctl_runtime[$key],
24   }
25   sysctl_runtime { $key:
26     val => $val1,
27   }
28 }