aboutsummaryrefslogtreecommitdiff
path: root/manifests/vserver.pp
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2010-09-12 20:49:06 -0300
committerSilvio Rhatto <rhatto@riseup.net>2010-09-12 20:49:06 -0300
commit32f0ce19c03280a59c05ad0a1267d88a63882385 (patch)
tree36851d83190d433d524505eaaa4dc971c44577d5 /manifests/vserver.pp
parentb222c04df3f0eeccc586168bcb17d81b641d74d1 (diff)
downloadpuppet-virtual-32f0ce19c03280a59c05ad0a1267d88a63882385.tar.gz
puppet-virtual-32f0ce19c03280a59c05ad0a1267d88a63882385.tar.bz2
Definition vs_cflags needs a $vserver parameter
Diffstat (limited to 'manifests/vserver.pp')
-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}"],
}
}
}