aboutsummaryrefslogtreecommitdiff
path: root/manifests/vserver.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/vserver.pp')
-rw-r--r--manifests/vserver.pp14
1 files changed, 13 insertions, 1 deletions
diff --git a/manifests/vserver.pp b/manifests/vserver.pp
index 89901a4..adf48e8 100644
--- a/manifests/vserver.pp
+++ b/manifests/vserver.pp
@@ -15,6 +15,10 @@ class vserver::host {
default => latest,
}
+ case $vserver_vdirbase {
+ '': { $vserver_vdirbase = "/var/lib/vservers" }
+ }
+
package {
"util-vserver":
ensure => $utilvserver_version;
@@ -38,6 +42,14 @@ class vserver::host {
mode => 0755, owner => root, group => root,
require => [ Package['util-vserver'], Package[debootstrap]];
+ "/etc/vservers/.default/vdirbase":
+ ensure => $vserver_vdirbase,
+ require => File[$vserver_vdirbase];
+
+ "$vserver_vdirbase":
+ ensure => directory,
+ mode => 000, owner => root, group => root;
+
# perhaps we should use hashify.
# but i'm commenting this out until we learn how to properly use in case we want to use it.
#"/etc/cron.daily/vserver-hashify":
@@ -135,7 +147,7 @@ define vs_create($in_domain, $context, $legacy = false, $distro = 'etch',
false: {
exec { "/usr/local/bin/build_vserver \"${vs_name}\" ${context} ${distro} ${debootstrap_mirror} ${vs_hostname} ${vs_interface} ${memory_limit}":
creates => "/etc/vservers/${vs_name}",
- require => File["/usr/local/bin/build_vserver"],
+ require => File["/usr/local/bin/build_vserver","/etc/vservers/.default/vdirbase"],
alias => "vs_create_${vs_name}",
timeout => "-1",
}