aboutsummaryrefslogtreecommitdiff
path: root/manifests/subsystems/sysctl.pp
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-01-24 13:18:39 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-01-24 13:18:39 -0200
commitad27f5dac1870369abe10e88fbb034ffa391f12c (patch)
tree2ec4be14af75dbc7508d490ed552288973e3a006 /manifests/subsystems/sysctl.pp
parent9c64cff37985a26f7aac5474928403f2605c588f (diff)
downloadpuppet-nodo-ad27f5dac1870369abe10e88fbb034ffa391f12c.tar.gz
puppet-nodo-ad27f5dac1870369abe10e88fbb034ffa391f12c.tar.bz2
Lots of subsystem refactoring; minor node changes
Diffstat (limited to 'manifests/subsystems/sysctl.pp')
-rw-r--r--manifests/subsystems/sysctl.pp18
1 files changed, 7 insertions, 11 deletions
diff --git a/manifests/subsystems/sysctl.pp b/manifests/subsystems/sysctl.pp
index 5e6dec7..d78a0f7 100644
--- a/manifests/subsystems/sysctl.pp
+++ b/manifests/subsystems/sysctl.pp
@@ -30,10 +30,10 @@ class sysctl {
group => "root",
mode => 0644,
ensure => present,
- content => "kernel.printk = $printk_levels\n",
+ content => "kernel.printk = ${printk_levels}\n",
}
- exec { "/bin/echo '$printk_levels' > /proc/sys/kernel/printk":
+ exec { "/bin/echo '${printk_levels}' > /proc/sys/kernel/printk":
subscribe => File["/etc/sysctl.d/kernel.printk.conf"],
refreshonly => true,
}
@@ -44,28 +44,24 @@ class sysctl::laptop {
owner => "root",
group => "root",
mode => 0644,
- source => "puppet://$server/modules/nodo/etc/sysctl.d/madwifi.conf",
- ensure => $lsbdistcodename ? {
+ source => "puppet:///modules/nodo/etc/sysctl.d/madwifi.conf",
+ ensure => $::lsbdistcodename ? {
'lenny' => present,
default => absent,
},
}
}
-class sysctl::appliance {
- case $kernel_panic {
- '': { $kernel_panic = "20" }
- }
-
+class sysctl::appliance($kernel_panic = hiera('nodo::sysctl::appliance', '20') {
file { "/etc/sysctl.d/kernel.panic.conf":
owner => "root",
group => "root",
mode => 0644,
ensure => present,
- content => "kernel.panic = $kernel_panic\n",
+ content => "kernel.panic = ${kernel_panic}\n",
}
- exec { "/bin/echo '$kernel_panic' > /proc/sys/kernel/panic":
+ exec { "/bin/echo '${kernel_panic}' > /proc/sys/kernel/panic":
subscribe => File["/etc/sysctl.d/kernel.panic.conf"],
refreshonly => true,
}