From: Peter Palfrader Date: Thu, 25 Feb 2010 19:09:19 +0000 (+0100) Subject: Try to get a kfreebsd module going X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=e8f6d2bfe6af3092f1bd958ff3ddf94ecac0b020;p=dsa-puppet.git Try to get a kfreebsd module going --- diff --git a/manifests/site.pp b/manifests/site.pp index 56f7d3b2..27a8a23b 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -89,5 +89,8 @@ node default { case $portforwarder_user_exists { "true": { include portforwarder } } + case $debarchitecture { + "kfreebsd-amd64", "kfreebsd-i386": { include kfreebsd } + } include samhain } diff --git a/modules/kfreebsd/files/dsa-killruby b/modules/kfreebsd/files/dsa-killruby new file mode 100644 index 00000000..cf5056a8 --- /dev/null +++ b/modules/kfreebsd/files/dsa-killruby @@ -0,0 +1,5 @@ +# every hour, kill all puppet jobs that are lingering around, i.e. all +# processes whose parent is init, and who have lived for longer than an hour +# (if they lived for 10 hours then they get to live an hour longer because +# the regex is just that gracious. +12 * * * * root pgrep -P 1 -f '/usr/bin/ruby1.8 /usr/sbin/puppetd --factsync -o --no-daemonize' | xargs ps --no-headers -o pid,etime | grep '[1-9]:..:..$' | awk '{print $1}' | xargs --no-run-if-empty kill -9 diff --git a/modules/kfreebsd/manifests/init.pp b/modules/kfreebsd/manifests/init.pp new file mode 100644 index 00000000..4dcc3831 --- /dev/null +++ b/modules/kfreebsd/manifests/init.pp @@ -0,0 +1,10 @@ +class kfreebsd { + file { + "/etc/cron.d/dsa-dsa-killruby": + source => [ "puppet:///kfreebsd/dsa-dsa-killruby" ], + ; + } +} +# vim:set et: +# vim:set ts=4: +# vim:set shiftwidth=4: