From e7d7ccccb32405b7f1d33b3580be8d884732f16e Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Wed, 14 Apr 2010 14:27:36 -0400 Subject: Reverting "the lvm and luks sys template should default to 'no' for both of these options. turning them on by default means that you get warnings/errors for systems that do not have either of these. you should opt-in, not opt-out" I misunderstood the ternary operator here --- templates/sys.conf.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'templates') 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' %> -- cgit v1.2.3 From 93851f9f3677009885e54fd53d9150aa5f527078 Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Mon, 1 Nov 2010 16:59:22 -0400 Subject: fix template to not include configuration lines if they are not defined this was necessary to change because in puppet 2.6, if you did not set one of the variables that had no defaults (eg. reporthost), you would get a backupninja config file with 'reporthost = undef', which is not valid for backupninja --- templates/backupninja.conf.erb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'templates') 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 %> -- cgit v1.2.3