From cd9887084acc4d023b92afbd7fd8da1d5d4b24a4 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 12 Sep 2010 22:13:37 -0300 Subject: Managing /etc/vservers/${name}/sched --- manifests/vserver.pp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'manifests') diff --git a/manifests/vserver.pp b/manifests/vserver.pp index b4d49d1..2c5b14c 100644 --- a/manifests/vserver.pp +++ b/manifests/vserver.pp @@ -392,44 +392,59 @@ define vs_sched($ensure = present, $fill_rate = '', $fill_rate2 = '', $interval = '', $interval2 = '', $tokens_min = '', $tokens_max = '', $tokens = '', $idle_time = false, $priority_bias = '') { + file { "/etc/vservers/${name}/sched": + ensure => directory, + owner => root, + group => root, + mode => 0755, + } + file { "/etc/vservers/${name}/sched/fill-rate": ensure => $ensure, content => "$fill_rate\n", + require => File["/etc/vservers/${name}/sched"], } file { "/etc/vservers/${name}/sched/fill-rate2": ensure => $ensure, content => "$fill_rate2\n", + require => File["/etc/vservers/${name}/sched"], } file { "/etc/vservers/${name}/sched/interval": ensure => $ensure, content => "$interval\n", + require => File["/etc/vservers/${name}/sched"], } file { "/etc/vservers/${name}/sched/interval2": ensure => $ensure, content => "$interval2\n", + require => File["/etc/vservers/${name}/sched"], } file { "/etc/vservers/${name}/sched/tokens-min": ensure => $ensure, content => "$tokens_min\n", + require => File["/etc/vservers/${name}/sched"], } file { "/etc/vservers/${name}/sched/tokens-max": ensure => $ensure, content => "$tokens_max\n", + require => File["/etc/vservers/${name}/sched"], } file { "/etc/vservers/${name}/sched/tokens": ensure => $ensure, content => "$tokens\n", + require => File["/etc/vservers/${name}/sched"], } file { "/etc/vservers/${name}/sched/priority-bias": ensure => $ensure, content => "$priority_bias\n", + require => File["/etc/vservers/${name}/sched"], } vs_cflags { "${name}-sched_hard": -- cgit v1.2.3