summaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2008-04-04 15:30:26 +0000
committermh <mh@immerda.ch>2008-04-04 15:30:26 +0000
commit42280d05116ff1972959f734f9e486880b989d8e (patch)
treea31ba358764fb469c8281d35a3ecf8c0e35a9dd3 /manifests/init.pp
parentb6695245b55ee2daebeb9427e73aadeb9590e434 (diff)
moved /dist/-stuff to /files/, heavily refactored a lot, made it more look all the same way. some sources added here and there. hope it still works everything, the location on the disk of /files/ is still call dists. no need to hurry to change that
Diffstat (limited to 'manifests/init.pp')
-rw-r--r--manifests/init.pp40
1 files changed, 21 insertions, 19 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 86ba178..5d5e637 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -1,42 +1,39 @@
# mysql.pp
# Copyright (C) 2007 David Schmitt <david@schmitt.edv-bus.at>
# See LICENSE for the full license granted to you.
+# changed by immerda project group (admin(at)immerda.ch)
class mysql::server {
+ case $operatingsystem {
+ gentoo: { include mysql::server::gentoo }
+ default: { include mysql::server::base }
+ }
+}
- $modulename = "mysql"
- $pkgname = "mysql"
- $gentoocat = "dev-db"
- $cnfname = "my.cnf"
- $cnfpath = "/etc/mysql"
-
- package { $pkgname:
+class mysql::server::base {
+ package { mysql:
ensure => present,
- category => $operatingsystem ? {
- gentoo => $gentoocat,
- default => '',
- }
}
file{
- "${cnfpath}/${cnfname}":
+ "/etc/mysql/my.cnf":
source => [
- "puppet://$server/dist/${modulename}/${fqdn}/${cnfname}",
- "puppet://$server/${modulename}/${fqdn}/${cnfname}",
- "puppet://$server/${modulename}/${cnfname}"
+ "puppet://$server/files/mysql/${fqdn}/my.cnf",
+ "puppet://$server/files/mysql/my.cnf",
+ "puppet://$server/mysql/my.cnf",
],
ensure => file,
owner => root,
group => 0,
mode => 0444,
- require => Package[$pkgname],
- notify => Service[$pkgname],
+ require => Package[mysql],
+ notify => Service[mysql],
}
- service { $pkgname:
+ service { mysql:
ensure => running,
hasstatus => true,
- require => Package[$pkgname],
+ require => Package[mysql],
}
munin::plugin {
@@ -47,5 +44,10 @@ class mysql::server {
Mysql_database<<||>>
Mysql_user<<||>>
Mysql_grant<<||>>
+}
+class mysql::server::gentoo inherits mysql::server::base {
+ Package[mysql] {
+ category => 'dev-db',
+ }
}