]> gitweb.fluxo.info Git - puppet-virtual.git/commitdiff
Merge branch 'master' of git://labs.riseup.net/module_virtual
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 27 Dec 2009 19:48:08 +0000 (17:48 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 27 Dec 2009 19:48:08 +0000 (17:48 -0200)
Conflicts:
manifests/vserver.pp

1  2 
manifests/vserver.pp

index 3609fb10ea7d06f2b9a84f08636f0d21080e187c,11068b653c0a382d73943823e6d11f177a3d9023..acd29f063f72853b93ce9a85f1900714ebe50a81
@@@ -56,70 -56,53 +56,70 @@@ class vserver::host 
      "/etc/modprobe.d/local-dummy":
        ensure => absent,
        mode => 0644, owner => root, group => root;
 -        
 -    "/usr/local/share/munin-plugins/vserver_resources":
 -      source => "puppet://$server/modules/virtual/munin/vserver_resources",
 -      mode => 0755, owner => root, group => root;
 -    
 -    "/usr/local/share/munin-plugins/vserver_cpu_":
 -      source => "puppet://$server/modules/virtual/munin/vserver_cpu_",
 -      mode => 0755, owner => root, group => root;
 -    
 -    "/usr/local/share/munin-plugins/vserver_loadavg":
 -      source => "puppet://$server/modules/virtual/munin/vserver_loadavg",
 -      mode => 0755, owner => root, group => root;
++<<<<<<< HEAD:manifests/vserver.pp
 +   }
 +
 +  # Setup some plugins if munin is enabled in the system
 +  case $munin_cidr_allow {
 +    '': {}
 +    default: {
 +               file {
 +                 "/usr/local/share/munin-plugins/vserver_resources":
-                    source => "puppet://$server/virtual/munin/vserver_resources",
-                    mode => 0755, owner => root, group => root;
++                   source => "puppet://$server/modules/virtual/munin/vserver_resources",
++                          mode => 0755, owner => root, group => root;
 +
 +                 "/usr/local/share/munin-plugins/vserver_cpu_":
-                    source => "puppet://$server/virtual/munin/vserver_cpu_",
-                    mode => 0755, owner => root, group => root;
++                   source => "puppet://$server/modules/virtual/munin/vserver_cpu_",
++                          mode => 0755, owner => root, group => root;
 +
 +                 "/usr/local/share/munin-plugins/vserver_loadavg":
-                    source => "puppet://$server/virtual/munin/vserver_loadavg",
-                    mode => 0755, owner => root, group => root;
++                   source => "puppet://$server/modules/virtual/munin/vserver_loadavg",
++                          mode => 0755, owner => root, group => root;
 +               }
 +             }
    }
    
 -  # This creates a load average graph combining the individual load averages of each vserver on the host
 -  munin::plugin {
 -    "vserver_loadavg":
 -      config => "user root\n",
 -      script_path_in => "/usr/local/share/munin-plugins";
 +  # Setup some plugins if munin is enabled in the system
 +  case $munin_cidr_allow {
 +    '': {}
 +    default: {
 +               # This creates a load average graph combining the individual load averages of each vserver on the host
 +               munin::plugin {
 +                 "vserver_loadavg":
 +                   config => "user root\n",
-                    script_path => "/usr/local/share/munin-plugins";
++                   script_path_in => "/usr/local/share/munin-plugins";
 +               }
 +
 +               # This creates a RSS graph for each vserver on the host (note after more than 4 vservers this can get noisy)
 +               munin::plugin {
 +                 "vserver_resources_RSS":
 +                   ensure => "vserver_resources",
 +                   config => "user root\nenv.resource RSS",
-                    script_path => "/usr/local/share/munin-plugins";
++                   script_path_in => "/usr/local/share/munin-plugins";
 +               }
 +
 +               # This creates a VM graph for each vserver on the host (note after more than 4 vservers this can get noisy)
 +               munin::plugin {
 +                 "vserver_resources_VM":
 +                   ensure => "vserver_resources",
 +                   config => "user root\nenv.resource VM",
-                    script_path => "/usr/local/share/munin-plugins";
++                   script_path_in => "/usr/local/share/munin-plugins";
 +               }
 +
 +               # This creates a VM graph for each vserver on the host (note after more than 4 vservers this can get noisy)
 +               munin::plugin {
 +                 "vserver_cpu_":
 +                   config => "user root\n",
-                    script_path => "/usr/local/share/munin-plugins";
++                  script_path_in => "/usr/local/share/munin-plugins";
 +               }
 +             }
    }
 -  
 -  # This creates a RSS graph for each vserver on the host (note after more than 4 vservers this can get noisy)
 -  munin::plugin {
 -    "vserver_resources_RSS":
 -      ensure => "vserver_resources",
 -      config => "user root\nenv.resource RSS",
 -      script_path_in => "/usr/local/share/munin-plugins";
 -  }
 -  
 -  # This creates a VM graph for each vserver on the host (note after more than 4 vservers this can get noisy)
 -  munin::plugin {
 -    "vserver_resources_VM":
 -      ensure => "vserver_resources",
 -      config => "user root\nenv.resource VM",
 -      script_path_in => "/usr/local/share/munin-plugins";
 -  }
 -  
 -  # This creates a VM graph for each vserver on the host (note after more than 4 vservers this can get noisy)
 -  munin::plugin {
 -    "vserver_cpu_":
 -      config => "user root\n",
 -      script_path_in => "/usr/local/share/munin-plugins";
 -  }
--}
  
 -define vs_create($in_domain, $context, $legacy = false, $distro = 'etch', $debootstrap_mirror = 'http://ftp.debian.org/debian') { 
 -  $vs_name = $legacy ? { true => $name, false => $in_domain ? { '' => $name, default => "${name}.${in_domain}" } }
 +define vs_create($in_domain, $context, $legacy = false, $distro = 'etch',
 +                 $debootstrap_mirror = 'http://ftp.debian.org/debian', $hostname = false, $interface = false) { 
 +  $vs_name      = $legacy    ? { true  => $name, false => $in_domain ? { '' => $name, default => "${name}.${in_domain}" } }
 +  $vs_hostname  = $hostname  ? { false => 'none', default => $hostname }
 +  $vs_interface = $interface ? { false => 'none', default => $interface }
  
    case $vs_name { '': { fail ( "Cannot create VServer with empty name" ) } }