From 8988c6c5e6ff77b49ab303ab2ba405acf429ea03 Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Wed, 21 May 2008 18:57:37 +0000 Subject: flip the override variables, when setting these, you are going to want to set $backupdir, not $backupdir_override --- manifests/server.pp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'manifests') diff --git a/manifests/server.pp b/manifests/server.pp index 10ff5a7..2ce2a34 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -1,17 +1,17 @@ class backupninja::server { - $backupdir = $backupdir_override ? { + $real_backupdir = $backupdir ? { '' => "/backup", - default => $backupdir_override, + default => $backupdir, } - $backupkeys = $backupkeys_override ? { + $real_backupkeys = $backupkeys ? { '' => "$fileserver/keys/backupkeys", - default => $backupkeys_override, + default => $backupkeys, } group { "backupninjas": ensure => "present", gid => 700 } - file { "$backupdir": + file { "$real_backupdir": ensure => "directory", mode => 710, owner => root, group => "backupninjas" } @@ -20,18 +20,18 @@ class backupninja::server { # this define allows nodes to declare a remote backup sandbox, that have to # get created on the server - define sandbox($host = false, $dir = false, $uid = false, $gid = "backupninjas") { + define sandbox($host = false, $dir = false, $keys = false, $uid = false, $gid = "backupninjas") { $real_host = $host ? { false => $fqdn, default => $host, } $real_dir = $dir ? { - false => "${backupninja::server::backupdir}/$fqdn", + false => "${backupninja::server::real_backupdir}/$fqdn", default => $dir, } - $real_backupkeys = $backupkeys ? { - false => "${backupninja::server::backupkeys}", - default => $backupkeys, + $real_keys = $keys ? { + false => "${backupninja::server::real_backupkeys}", + default => $keys, } @@file { "$real_dir": ensure => directory, -- cgit v1.2.3