aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-02-13 13:24:25 -0200
committerSilvio Rhatto <rhatto@riseup.net>2011-02-13 13:24:25 -0200
commitc6aa27782c860dc4acda37d2e84825fc47a8ef24 (patch)
tree86f09d7bdda6e898fe45633fe60788321a915572
parentacb2e81dce10fc755601bbd0c3e09cd13f1b1fec (diff)
parent93851f9f3677009885e54fd53d9150aa5f527078 (diff)
downloadpuppet-backupninja-c6aa27782c860dc4acda37d2e84825fc47a8ef24.tar.gz
puppet-backupninja-c6aa27782c860dc4acda37d2e84825fc47a8ef24.tar.bz2
Merge branch 'master' of git://labs.riseup.net/module_backupninja
-rw-r--r--manifests/sys.pp14
-rw-r--r--templates/backupninja.conf.erb12
-rw-r--r--templates/sys.conf.erb4
3 files changed, 18 insertions, 12 deletions
diff --git a/manifests/sys.pp b/manifests/sys.pp
index ac42e37..7de319c 100644
--- a/manifests/sys.pp
+++ b/manifests/sys.pp
@@ -13,16 +13,16 @@
define backupninja::sys($order = 30,
$ensure = present,
$parentdir = '/var/backups',
- $packages = yes,
+ $packages = true,
$packagesfile = '/var/backups/dpkg-selections.txt',
- $partitions = yes,
+ $partitions = true,
$partitionsfile = '/var/backups/partitions.__star__.txt',
- $dosfdisk = yes,
- $hardware = yes,
+ $dosfdisk = true,
+ $hardware = true,
$hardwarefile = '/var/backups/hardware.txt',
- $dohwinfo = yes,
- $doluks = no,
- $dolvm = no
+ $dohwinfo = true,
+ $doluks = false,
+ $dolvm = false
) {
include backupninja::client::defaults
file { "${backupninja::client::defaults::configdir}/${order}_${name}.sys":
diff --git a/templates/backupninja.conf.erb b/templates/backupninja.conf.erb
index 960d39f..abc7c29 100644
--- a/templates/backupninja.conf.erb
+++ b/templates/backupninja.conf.erb
@@ -8,9 +8,15 @@ when = <%= send(:when) %>
reportemail = <%= reportemail %>
reportsuccess = <%= reportsuccess ? 'yes' : 'no' %>
reportwarning = <%= reportwarning ? 'yes' : 'no' %>
-reporthost = <%= reporthost %>
-reportuser = <%= reportuser %>
-reportdirectory = <%= reportdirectory %>
+<% if reporthost.is_a? String -%>
+<%= 'reporthost = ' + reporthost %>
+<% end -%>
+<% if reportuser.is_a? String -%>
+<%= 'reportuser = ' + reportuser %>
+<% end -%>
+<% if reportdirectory.is_a? String -%>
+<%= 'reportdirectory = ' + reportdirectory %>
+<% end -%>
logfile = <%= logfile %>
configdirectory = <%= configdir %>
scriptdirectory = <%= scriptdir %>
diff --git a/templates/sys.conf.erb b/templates/sys.conf.erb
index d15f821..a684e8b 100644
--- a/templates/sys.conf.erb
+++ b/templates/sys.conf.erb
@@ -14,5 +14,5 @@ partitions = <%= partitions ? 'yes' : 'no' %>
dosfdisk = <%= dosfdisk ? 'yes' : 'no' %>
hardware = <%= hardware ? 'yes' : 'no' %>
dohwinfo = <%= dohwinfo ? 'yes' : 'no' %>
-luksheaders = <%= doluks ? 'no' : 'yes' %>
-lvm = <%= dolvm ? 'no' : 'yes' %>
+luksheaders = <%= doluks ? 'yes' : 'no' %>
+lvm = <%= dolvm ? 'yes' : 'no' %>