From b7c93a92ea34fc34d62c9e4e0bc55c68087f3e7d Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Mon, 21 Nov 2011 11:10:22 -0200 Subject: Adding sysctl::appliance --- manifests/appliance.pp | 2 ++ manifests/subsystems/sysctl.pp | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) (limited to 'manifests') diff --git a/manifests/appliance.pp b/manifests/appliance.pp index ff00340..94da45b 100644 --- a/manifests/appliance.pp +++ b/manifests/appliance.pp @@ -1,4 +1,6 @@ class nodo::appliance inherits nodo::physical { + include sysctl::appliance + # fstab file { "/etc/fstab": source => "puppet://$appliance/modules/nodo/etc/fstab/appliance", diff --git a/manifests/subsystems/sysctl.pp b/manifests/subsystems/sysctl.pp index 8c5009b..28f140b 100644 --- a/manifests/subsystems/sysctl.pp +++ b/manifests/subsystems/sysctl.pp @@ -42,3 +42,22 @@ class sysctl::laptop { }, } } + +class sysctl::appliance { + case $kernel_panic { + '': { $kernel_panic = "20" } + } + + file { "/etc/sysctl.d/kernel.panic.conf": + owner => "root", + group => "root", + mode => 0644, + ensure => present, + content => "kernel.panic = $kernel_panic\n", + } + + exec { "/bin/echo '$kernel_panic' > /proc/sys/kernel/panic": + subscribe => File["/etc/sysctl.d/kernel.panic.conf"], + refreshonly => true, + } +} -- cgit v1.2.3