diff options
author | Micah Anderson <micah@riseup.net> | 2010-11-01 16:59:22 -0400 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2010-11-01 16:59:22 -0400 |
commit | 93851f9f3677009885e54fd53d9150aa5f527078 (patch) | |
tree | 24b23e4a0eebb53584b1ef6bd421b9a76ba82467 /templates | |
parent | 4b587a76cbe90bada8231ba2019e7e462b00f17d (diff) | |
download | puppet-backupninja-93851f9f3677009885e54fd53d9150aa5f527078.tar.gz puppet-backupninja-93851f9f3677009885e54fd53d9150aa5f527078.tar.bz2 |
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
Diffstat (limited to 'templates')
-rw-r--r-- | templates/backupninja.conf.erb | 12 |
1 files changed, 9 insertions, 3 deletions
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 %> |