diff options
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/init.pp | 40 |
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 |