aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'manifests')
-rw-r--r--manifests/maildir.pp46
1 files changed, 20 insertions, 26 deletions
diff --git a/manifests/maildir.pp b/manifests/maildir.pp
index 87fc39d..1ced771 100644
--- a/manifests/maildir.pp
+++ b/manifests/maildir.pp
@@ -16,31 +16,25 @@
# that we can find the correct file to remove).
#
#
-define backupninja::maildir($order = 40,
- $ensure = present,
- $when = 'everyday at 21:00',
- $srcdir = false,
- $destdir = false,
- $desthost = false,
- $destuser = false,
- $destid_file = false,
- $remove = no,
- $multiconnection = yes
- ) {
- include backupninja::client
+define backupninja::maildir(
+ $order = 40, $ensure = present, $when = 'everyday at 21:00', $srcdir = false,
+ $destdir = false, $desthost = false, $destuser = false, $destid_file = false,
+ $remove = no, $multiconnection = yes)
+{
+ include backupninja::client
- case $srcdir { false: { err("need to define a source directory to backup!") } }
- case $destdir { false: { err("need to define a destination directory to backup!") } }
- case $desthost { false: { err("need to define a destination host for backups!") } }
- case $destuser { false: { err("need to define a destination user for backups!") } }
- case $destid_file { false: { err("need to define a ssh key id file to use!") } }
-
- file { "${backupninja::client::configdir}/${order}_${name}.maildir":
- ensure => $ensure,
- content => template('backupninja/maildir.conf.erb'),
- owner => root,
- group => root,
- mode => 0600,
- require => File["${backupninja::client::configdir}"]
- }
+ case $srcdir { false: { err("need to define a source directory to backup!") } }
+ case $destdir { false: { err("need to define a destination directory to backup!") } }
+ case $desthost { false: { err("need to define a destination host for backups!") } }
+ case $destuser { false: { err("need to define a destination user for backups!") } }
+ case $destid_file { false: { err("need to define a ssh key id file to use!") } }
+
+ file { "${backupninja::client::configdir}/${order}_${name}.maildir":
+ ensure => $ensure,
+ content => template('backupninja/maildir.conf.erb'),
+ owner => root,
+ group => root,
+ mode => 0600,
+ require => File["${backupninja::client::configdir}"]
+ }
}