aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-01-17 21:54:43 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-01-17 21:54:43 -0200
commite87974d37018b7ab8cf422a0797644c20e84e0c6 (patch)
treef356efc902b44e9d39efe06f8c7284b4fbb729a3 /manifests
parentf9096cf9a0115d47755c1eb5421efe1885b4f8fc (diff)
parent711a471ae8c77f0fce3f05dd57ebd308d0144f57 (diff)
downloadpuppet-virtual-e87974d37018b7ab8cf422a0797644c20e84e0c6.tar.gz
puppet-virtual-e87974d37018b7ab8cf422a0797644c20e84e0c6.tar.bz2
Merge branch 'master' of git://labs.riseup.net/module_virtual
Conflicts: manifests/vserver.pp
Diffstat (limited to 'manifests')
-rw-r--r--manifests/openvpn.pp4
-rw-r--r--manifests/vserver.pp10
-rw-r--r--manifests/xen.pp60
3 files changed, 47 insertions, 27 deletions
diff --git a/manifests/openvpn.pp b/manifests/openvpn.pp
index 7745d38..5aa8d92 100644
--- a/manifests/openvpn.pp
+++ b/manifests/openvpn.pp
@@ -14,10 +14,10 @@ class virtual::openvpn::base {
class virtual::openvpn::host_base inherits virtual::openvpn::base {
file {
"/var/lib/puppet/modules/virtual/openvpn/create_interface":
- source => "puppet://$server/modules/virtual/create_openvpn_interface",
+ source => "puppet:///modules/virtual/create_openvpn_interface",
mode => 0755, owner => root, group => 0;
"/var/lib/puppet/modules/virtual/openvpn/destroy_interface":
- source => "puppet://$server/modules/virtual/destroy_openvpn_interface",
+ source => "puppet:///modules/virtual/destroy_openvpn_interface",
mode => 0755, owner => root, group => 0;
}
}
diff --git a/manifests/vserver.pp b/manifests/vserver.pp
index 4d40b64..8f7437c 100644
--- a/manifests/vserver.pp
+++ b/manifests/vserver.pp
@@ -38,7 +38,7 @@ class vserver::host {
require => File["/etc/vservers"];
"/usr/local/bin/build_vserver":
- source => "puppet://$server/modules/virtual/vserver/build_vserver",
+ source => "puppet:///modules/virtual/vserver/build_vserver",
mode => 0755, owner => root, group => root,
require => [ Package['util-vserver'], Package[debootstrap]];
@@ -53,7 +53,7 @@ class vserver::host {
# perhaps we should use hashify.
# but i'm commenting this out until we learn how to properly use in case we want to use it.
#"/etc/cron.daily/vserver-hashify":
- # source => "puppet://$server/virtual/hashify.cron.daily",
+ # source => "puppet:///virtual/hashify.cron.daily",
# mode => 0755, owner => root, group => root;
}
@@ -77,15 +77,15 @@ class vserver::host {
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;
}
}
diff --git a/manifests/xen.pp b/manifests/xen.pp
index 301b316..516a59c 100644
--- a/manifests/xen.pp
+++ b/manifests/xen.pp
@@ -4,12 +4,17 @@
class munin::plugins::xen {
munin::remoteplugin {
- xen_mem:
- source => "puppet://$server/modules/virtual/munin/xen_mem",
- config => "user root";
+ xen-multi:
+ source => "puppet:///modules/virtual/munin/xen_mem",
+ config => "user root",
+ ensure => absent;
xen_vm:
- source => "puppet://$server/modules/virtual/munin/xen_vm",
- config => "user root";
+ source => "puppet:///modules/virtual/munin/xen_vm",
+ config => "user root",
+ ensure => absent;
+ 'xen-multi':
+ source => 'puppet:///modules/virtual/munin/xen-multi',
+ config => 'user root';
}
}
@@ -41,14 +46,13 @@ class xen::domain::base {
}
file{'/etc/xen/xend-config.sxp':
- source => [ "puppet://$server/files/virtual/xen/${fqdn}/config/xend-config.sxp",
- "puppet://$server/files/virtual/xen/config/${domain}/xend-config.sxp",
- "puppet://$server/files/virtual/xen/config/${operatingsystem}/xend-config.sxp",
- "puppet://$server/files/virtual/xen/config/${operatingsystem}/$lsbdistcodename/xend-config.sxp",
- "puppet://$server/files/virtual/xen/config/xend-config.sxp",
- "puppet://$server/modules/virtual/xen/config/${operatingsystem}/xend-config.sxp",
- "puppet://$server/modules/virtual/xen/config/${operatingsystem}/$lsbdistcodename/xend-config.sxp",
- "puppet://$server/modules/virtual/xen/config/xend-config.sxp" ],
+ source => [ "puppet:///modules/site_virtual/xen/config/${fqdn}/config/xend-config.sxp",
+ "puppet:///modules/site_virtual/xen/config/${domain}/xend-config.sxp",
+ "puppet:///modules/site_virtual/xen/config/${operatingsystem}/xend-config.sxp",
+ "puppet:///modules/site_virtual/xen/config/${operatingsystem}/${lsbdistcodeename}/xend-config.sxp",
+ "puppet:///modules/site_virtual/xen/config/xend-config.sxp",
+ "puppet:///modules/virtual/xen/config/${operatingsystem}/xend-config.sxp",
+ "puppet:///modules/virtual/xen/config/xend-config.sxp" ],
notify => Service['xend'],
owner => root, group => 0, mode => 0644;
}
@@ -64,13 +68,13 @@ class xen::domain::centos inherits xen::domain::base {
}
file{'/etc/sysconfig/xend':
- source => "puppet://$server/modules/virtual/xen/${operatingsystem}/sysconfig/xend",
+ source => "puppet:///modules/virtual/xen/${operatingsystem}/sysconfig/xend",
notify => Service['xend'],
owner => root, group => 0, mode => 0644;
}
file{'/etc/sysconfig/xendomains':
- source => "puppet://$server/modules/virtual/xen/${operatingsystem}/sysconfig/xendomains",
+ source => "puppet:///modules/virtual/xen/${operatingsystem}/sysconfig/xendomains",
owner => root, group => 0, mode => 0644;
}
@@ -88,11 +92,21 @@ class xen::domain::centos inherits xen::domain::base {
}
class xen::domain::debian inherits xen::domain::base {
- $xen_linux_system = $architecture ? {
- amd64 => "xen-linux-system-2.6.26-1-xen-amd64",
- i386 => "xen-linux-system-2.6.26-1-xen-686"
+ case $lsbdistcodename {
+ "lenny": {
+ $xen_linux_system = $architecture ? {
+ amd64 => "xen-linux-system-2.6.26-2-xen-amd64",
+ i386 => "xen-linux-system-2.6.26-2-xen-686"
+ }
+ }
+ "squeeze": {
+ $xen_linux_system = $architecture ? {
+ /(amd64|x86_64)/ => "xen-linux-system-2.6.32-5-xen-amd64",
+ i386 => "xen-linux-system-2.6.32-5-xen-686"
+ }
+ }
}
-
+
package {
"$xen_linux_system":
ensure => present,
@@ -129,12 +143,18 @@ class xen::dom0::debian inherits xen::dom0::base {
ensure => "4.1-1~bpo50+1",
}
}
+ squeeze: {
+ package {
+ "xen-tools":
+ ensure => installed;
+ }
+ }
}
file {
"/etc/xen-tools/xen-tools.conf":
owner => root, group => 0, mode => 0644,
- content => template("virtual/xen-tools.conf.erb"),
+ content => template("site_virtual/xen/${operatingsystem}/${lsbdistcodename}/xen-tools.conf.erb"),
require => Package['xen-tools'];
}
}