aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordrebs <drebs@riseup.net>2010-03-14 19:03:16 -0300
committerdrebs <drebs@riseup.net>2010-03-14 19:03:16 -0300
commit09b275be32893f403a6e590d9a36da5506065b18 (patch)
treeb63b58dd90b6767d390ecf4c86058d03302e46ea
parentd97bce99fa4918a63ce9b0abc04a7627cab8db11 (diff)
downloadpuppet-nodo-09b275be32893f403a6e590d9a36da5506065b18.tar.gz
puppet-nodo-09b275be32893f403a6e590d9a36da5506065b18.tar.bz2
Adding memory limit to vserves.
-rw-r--r--manifests/init.pp40
1 files changed, 22 insertions, 18 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index f66edb1..8ae9589 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -234,21 +234,24 @@ class nodo::vserver inherits nodo {
default => "$node_hosting_type",
}
- if $hosting_type == "direct" {
- # Apply munin configuration for this node for
- # directly hosted nodes.
- Munin_node <<| title == $hostname |>>
- }
-
- if $hosting_type == "third-party" {
- # Apply munin configuration for this node for third-party
- # hosted nodes.
- munin_node { "$hostname": }
+ case $hosting_type {
+ "direct": {
+ # Apply munin configuration for this node for
+ # directly hosted nodes.
+ Munin_node <<| title == $hostname |>>
+ }
+ "third-party": {
+ # Apply munin configuration for this node for third-party
+ # hosted nodes.
+ munin_node { "$hostname": }
+ }
}
# Define a vserver instance
- define instance($context, $ensure = 'running', $proxy = false, $puppetmaster = false, $gitd = false,
- $icecast = false, $sound = false, $ticket = false) {
+ define instance($context, $ensure = 'running', $proxy = false,
+ $puppetmaster = false, $gitd = false,
+ $icecast = false, $sound = false, $ticket = false,
+ $memory_limit = false) {
# set instance id
if $context < 9 {
@@ -258,12 +261,13 @@ class nodo::vserver inherits nodo {
}
vserver { $name:
- ensure => $ensure,
- context => "$context",
- mark => 'default',
- distro => 'lenny',
- interface => "eth0:192.168.0.$context/24",
- hostname => "$name.$domain",
+ ensure => $ensure,
+ context => "$context",
+ mark => 'default',
+ distro => 'lenny',
+ interface => "eth0:192.168.0.$context/24",
+ hostname => "$name.$domain",
+ memory_limit => $memory_limit,
}
# Some nodes need a lot of space at /tmp otherwise some admin