From c209466c4d4ae022591b091d766f296f47fda0f2 Mon Sep 17 00:00:00 2001 From: drebs Date: Mon, 15 Mar 2010 16:25:43 -0300 Subject: Adding VIRT_MEM flags to vservers with limited memory. --- manifests/vserver.pp | 6 ++++++ templates/flags.erb | 3 +++ 2 files changed, 9 insertions(+) create mode 100644 templates/flags.erb diff --git a/manifests/vserver.pp b/manifests/vserver.pp index 63053a3..7a0db8e 100644 --- a/manifests/vserver.pp +++ b/manifests/vserver.pp @@ -148,6 +148,7 @@ define vs_create($in_domain, $context, $legacy = false, $distro = 'etch', file { "/etc/vservers/${vs_name}/rlimits": ensure => directory, mode => 0755, owner => root, group => root, + require => File["/etc/vservers/${vs_name}"], } file { "/etc/vservers/${vs_name}/rlimits/rss.hard": mode => 0644, owner => root, group => root, @@ -159,6 +160,11 @@ define vs_create($in_domain, $context, $legacy = false, $distro = 'etch', content => template("virtual/rss.soft.erb"), require => File["/etc/vservers/${vs_name}/rlimits"], } + file { "/etc/vservers/${vs_name}/flags": + mode => 0644, owner => root, group => root, + content => template("virtual/flags.erb"), + require => File["/etc/vservers/${vs_name}"], + } } } } diff --git a/templates/flags.erb b/templates/flags.erb new file mode 100644 index 0000000..630fba7 --- /dev/null +++ b/templates/flags.erb @@ -0,0 +1,3 @@ +<% if memory_limit != false -%> +VIRT_MEM +<% end -%> -- cgit v1.2.3