aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/vserver.pp26
1 files changed, 13 insertions, 13 deletions
diff --git a/manifests/vserver.pp b/manifests/vserver.pp
index c4da01b..4d4eaf1 100644
--- a/manifests/vserver.pp
+++ b/manifests/vserver.pp
@@ -501,33 +501,33 @@ define vs_sched($ensure = present, $fill_rate = '', $fill_rate2 = '',
}
}
-define vs_cflags($flag, $ensure = present) {
- if ! defined(File["/etc/vservers/${name}/cflags"]) {
- file { "/etc/vservers/${name}/cflags":
+define vs_cflags($vserver, $flag, $ensure = present) {
+ if ! defined(File["/etc/vservers/${vserver}/cflags"]) {
+ file { "/etc/vservers/${vserver}/cflags":
ensure => present,
}
}
- line {"vs_cflags-${name}-${flag}":
+ line {"vs_cflags-${vserver}-${flag}":
ensure => $ensure,
- file => "/etc/vservers/${name}/cflags",
+ file => "/etc/vservers/${vserver}/cflags",
line => "${flag}",
- require => Exec["vs_create_${name}"],
- notify => Exec["vattribute-${name}-${flag}"],
+ require => Exec["vs_create_${vserver}"],
+ notify => Exec["vattribute-${vserver}-${flag}"],
}
case $ensure {
present: {
- exec { "vattribute-${name}-${flag}":
- command => "vattribute --set --xid `cat /etc/vservers/$name/context` --flag ${flag}",
+ exec { "vattribute-${vserver}-${flag}":
+ command => "vattribute --set --xid `cat /etc/vservers/$vserver/context` --flag ${flag}",
refreshonly => true,
- require => exec["vs_create_${name}"],
+ require => exec["vs_create_${vserver}"],
}
default: {
- exec { "vattribute-${name}-${flag}":
- command => "vattribute --set --xid `cat /etc/vservers/$name/context` --flag ~${flag}",
+ exec { "vattribute-${vserver}-${flag}":
+ command => "vattribute --set --xid `cat /etc/vservers/$vserver/context` --flag ~${flag}",
refreshonly => true,
- require => exec["vs_create_${name}"],
+ require => exec["vs_create_${vserver}"],
}
}
}