aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2010-09-12 20:40:53 -0300
committerSilvio Rhatto <rhatto@riseup.net>2010-09-12 20:40:53 -0300
commit844c6cef36127f9197833a2df80ee9da6995ee0a (patch)
treedf8ddd31da5572f0390f2e1cb7e26b94725d14ab
parentf41367c89145af7c81d58bc7401eda18d4c53803 (diff)
downloadpuppet-virtual-844c6cef36127f9197833a2df80ee9da6995ee0a.tar.gz
puppet-virtual-844c6cef36127f9197833a2df80ee9da6995ee0a.tar.bz2
Oops
-rw-r--r--manifests/vserver.pp44
1 files changed, 22 insertions, 22 deletions
diff --git a/manifests/vserver.pp b/manifests/vserver.pp
index 63c1080..66be244 100644
--- a/manifests/vserver.pp
+++ b/manifests/vserver.pp
@@ -392,42 +392,42 @@ define vs_sched($ensure = present, $fill_rate = '', $fill_rate2 = '',
$interval = '', $interval2 = '', $tokens_min = '', $tokens_max = '',
$tokens = '', $idle_time = false, $priority_bias = '') {
- file { "/etc/names/${name}/sched/fill-rate":
+ file { "/etc/vservers/${name}/sched/fill-rate":
ensure => $ensure,
content => "$fill_rate\n",
}
- file { "/etc/names/${name}/sched/fill-rate2":
+ file { "/etc/vservers/${name}/sched/fill-rate2":
ensure => $ensure,
content => "$fill_rate2\n",
}
- file { "/etc/names/${name}/sched/interval":
+ file { "/etc/vservers/${name}/sched/interval":
ensure => $ensure,
content => "$interval\n",
}
- file { "/etc/names/${name}/sched/interval2":
+ file { "/etc/vservers/${name}/sched/interval2":
ensure => $ensure,
content => "$interval2\n",
}
- file { "/etc/names/${name}/sched/tokens-min":
+ file { "/etc/vservers/${name}/sched/tokens-min":
ensure => $ensure,
content => "$tokens_min\n",
}
- file { "/etc/names/${name}/sched/tokens-max":
+ file { "/etc/vservers/${name}/sched/tokens-max":
ensure => $ensure,
content => "$tokens_max\n",
}
- file { "/etc/names/${name}/sched/tokens":
+ file { "/etc/vservers/${name}/sched/tokens":
ensure => $ensure,
content => "$tokens\n",
}
- file { "/etc/names/${name}/sched/priority-bias":
+ file { "/etc/vservers/${name}/sched/priority-bias":
ensure => $ensure,
content => "$priority_bias\n",
}
@@ -476,12 +476,12 @@ define vs_sched($ensure = present, $fill_rate = '', $fill_rate2 = '',
true: {
$set_idle_time = "--idle-time"
- file { "/etc/names/${name}/sched/idle-time":
+ file { "/etc/vservers/${vserver}/sched/idle-time":
ensure => present,
}
}
default: {
- file { "/etc/names/${name}/sched/idle-time":
+ file { "/etc/vservers/${vserver}/sched/idle-time":
ensure => absent,
}
}
@@ -489,28 +489,28 @@ define vs_sched($ensure = present, $fill_rate = '', $fill_rate2 = '',
$vsched_params = "$set_fill_rate $set_fill_rate2 $set_interval $set_interval2 $set_tokens_min $set_tokens_max $set_tokens $set_idle_time $set_priority_bias"
- exec { "vsched --xid `cat /etc/names/$name/context` ${vsched_params} --force":
- subscribe => File["/etc/names/$name/sched/fill_rate", "/etc/names/$name/sched/fill_rate2",
- "/etc/names/$name/sched/interval", "/etc/names/$name/sched/interval2",
- "/etc/names/$name/sched/tokens-min", "/etc/names/$name/sched/tokens-max",
- "/etc/names/$name/sched/tokens", "/etc/names/$name/sched/idle-time"],
+ exec { "vsched --xid `cat /etc/vservers/$vserver/context` ${vsched_params} --force":
+ subscribe => File["/etc/vservers/$vserver/sched/fill_rate", "/etc/vservers/$vserver/sched/fill_rate2",
+ "/etc/vservers/$vserver/sched/interval", "/etc/vservers/$vserver/sched/interval2",
+ "/etc/vservers/$vserver/sched/tokens-min", "/etc/vservers/$vserver/sched/tokens-max",
+ "/etc/vservers/$vserver/sched/tokens", "/etc/vservers/$vserver/sched/idle-time"],
refreshonly => true,
- require => Exec["vs_create_${name}"],
+ require => Exec["vs_create_${vserver}"],
}
}
}
}
-define vs_cflags($flag, $ensure = present) {
- if ! defined(File["/etc/names/${name}/cflags"]) {
- file { "/etc/names/${name}/cflags":
+define vs_cflags($name, $flag, $ensure = present) {
+ if ! defined(File["/etc/vservers/${name}/cflags"]) {
+ file { "/etc/vservers/${name}/cflags":
ensure => present,
}
}
line {"vs_cflags-${name}-${flag}":
ensure => $ensure,
- file => "/etc/names/${name}/cflags",
+ file => "/etc/vservers/${name}/cflags",
line => "${flag}",
require => Exec["vs_create_${name}"],
notify => Exec["vattribute-${name}-${flag}"],
@@ -519,13 +519,13 @@ define vs_cflags($flag, $ensure = present) {
case $ensure {
present: {
exec { "vattribute-${name}-${flag}":
- command => "vattribute --set --xid `cat /etc/names/$name/context` --flag ${flag}",
+ command => "vattribute --set --xid `cat /etc/vservers/$name/context` --flag ${flag}",
refreshonly => true,
require => exec["vs_create_${name}"],
}
default: {
exec { "vattribute-${name}-${flag}":
- command => "vattribute --set --xid `cat /etc/names/$name/context` --flag ~${flag}",
+ command => "vattribute --set --xid `cat /etc/vservers/$name/context` --flag ~${flag}",
refreshonly => true,
require => exec["vs_create_${name}"],
}