From 53f68419ad51518aaadf0e57641ec10357ac5f80 Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Fri, 29 Feb 2008 17:38:32 +0000 Subject: install anarcats backupninja module changes --- manifests/mysql.pp | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) (limited to 'manifests/mysql.pp') 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}"] } } -- cgit v1.2.3