diff options
-rw-r--r-- | manifests/sys.pp | 14 | ||||
-rw-r--r-- | templates/backupninja.conf.erb | 12 | ||||
-rw-r--r-- | templates/sys.conf.erb | 4 |
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' %> |