]> gitweb.fluxo.info Git - puppet-virtual.git/commitdiff
Merge branch 'master' of git://labs.riseup.net/module_virtual
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 17 Jan 2013 23:54:43 +0000 (21:54 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 17 Jan 2013 23:54:43 +0000 (21:54 -0200)
Conflicts:
manifests/vserver.pp

1  2 
manifests/vserver.pp

index 4d40b64b6886377ec88c23a34108761cb4dff317,9e1566d18e32c23ee2c8b6a89a1d21c12f8fd6ea..8f7437cd3de0e11acb55cf6172889597a246bd13
@@@ -69,62 -56,48 +69,62 @@@ 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:///modules/virtual/munin/vserver_resources",
 -      mode => 0755, owner => root, group => root;
 -    
 -    "/usr/local/share/munin-plugins/vserver_cpu_":
 -      source => "puppet:///modules/virtual/munin/vserver_cpu_",
 -      mode => 0755, owner => root, group => root;
 -    
 -    "/usr/local/share/munin-plugins/vserver_loadavg":
 -      source => "puppet:///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";
 -  }
 -  
 -  # 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";
 +   }
 +
 +  # Setup some plugins if munin is enabled in the system
 +  case $virtual_munin {
 +    false: {}
 +    default: {
 +               file {
 +                 "/usr/local/share/munin-plugins/vserver_resources":
-                    source => "puppet://$server/modules/virtual/munin/vserver_resources",
++                   source => "puppet:///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_",
++                   source => "puppet:///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",
++                   source => "puppet:///modules/virtual/munin/vserver_loadavg",
 +                   mode   => 0755, owner => root, group => root;
 +               }
 +             }
    }
    
 -  # 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";
 +  # Setup some plugins if munin is enabled in the system
 +  case $virtual_munin {
 +    false: {}
 +    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_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";
 +               }
 +             }
    }
  }