aboutsummaryrefslogtreecommitdiff
path: root/manifests/mysql.pp
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2008-02-29 17:38:32 +0000
committerMicah Anderson <micah@riseup.net>2008-02-29 17:38:32 +0000
commit53f68419ad51518aaadf0e57641ec10357ac5f80 (patch)
tree2f86753ac33fea429b0ee02926bba8dfbe2a4df2 /manifests/mysql.pp
parent4a59f0dbfbb67964379815a656e318b83702f723 (diff)
downloadpuppet-backupninja-53f68419ad51518aaadf0e57641ec10357ac5f80.tar.gz
puppet-backupninja-53f68419ad51518aaadf0e57641ec10357ac5f80.tar.bz2
install anarcats backupninja module changes
Diffstat (limited to 'manifests/mysql.pp')
-rw-r--r--manifests/mysql.pp21
1 files changed, 4 insertions, 17 deletions
diff --git a/manifests/mysql.pp b/manifests/mysql.pp
index 0fae221..e2e7442 100644
--- a/manifests/mysql.pp
+++ b/manifests/mysql.pp
@@ -2,8 +2,6 @@
#
# Valid attributes for this type are:
#
-# configdir: The directory to write the handler config file into.
-#
# order: The prefix to give to the handler config filename, to set
# order in which the actions are executed during the backup run.
#
@@ -16,8 +14,7 @@
# backupninja documentation, with the caveat that hotcopy, sqldump,
# and compress take true/false rather than yes/no.
#
-define backupninja::mysql($configdir = '/etc/backup.d',
- $order = 10,
+define backupninja::mysql($order = 10,
$ensure = present,
$user = false,
$dbusername = false,
@@ -30,23 +27,13 @@ define backupninja::mysql($configdir = '/etc/backup.d',
$compress = false,
$configfile = '/etc/mysql/debian.cnf'
) {
- # Make sure the directory that the config goes into exists already
- if defined(File["${configdir}"]) {
- # Yay for a lack of a negation operator, and the inability
- # to provide empty blocks
- include null_class
- } else {
- file { $configdir:
- ensure => directory
- }
- }
-
- file { "${configdir}/${order}_${name}.mysql":
+ include backupninja::client
+ file { "${backup::client::configdir}/${order}_${name}.mysql":
ensure => $ensure,
content => template('backupninja/mysql.conf.erb'),
owner => root,
group => root,
mode => 0600,
- require => File["${configdir}"]
+ require => File["${backupninja::client::configdir}"]
}
}