]> gitweb.fluxo.info Git - puppet-backupninja.git/commitdiff
We might get either a var or an array - we should be able to take
authorJamie McClelland <jm@mayfirst.org>
Sun, 20 Mar 2011 03:55:22 +0000 (23:55 -0400)
committerJamie McClelland <jm@mayfirst.org>
Sun, 20 Mar 2011 03:55:22 +0000 (23:55 -0400)
either.

templates/mysql.conf.erb
templates/pgsql.conf.erb

index 2efa4b1cbec1cf45c344c20abecee579481e9dd6..c70aba0b78a724c02ee82d7e319ffb4b5d22fd62 100644 (file)
@@ -17,7 +17,9 @@ compress = <%= compress ? 'yes' : 'no' %>
 configfile = <%= real_configfile %>
 <% end %>
 
-<% if nodata %>
-nodata = <% nodata.each do |dbtable| -%><%= dbtable %> <% end -%>
-<% end %>
+<% if nodata.is_a? String -%>
+<%= 'nodata = ' + nodata %>
+<% elsif nodata.is_a? Array -%>
+<%= "nodata = " + nodata.map { |i| "#{i}" }.join(" ") %>
+<% end -%>
 
index 7781ef41eb88bac401cfe22f1c5c62ffce5e41ea..5ffa89c00b016eb73e3b4a6bf990717a1311dc25 100644 (file)
@@ -4,8 +4,10 @@ vsname = <%= vsname %>
 <% if backupdir %>
 backupdir = <%= backupdir %>
 <% end %>
-<% if databases %>
-databases = <%= databases %>
-<% end %>
+<% if databases.is_a? String -%>
+<%= 'databases = ' + databases %>
+<% elsif databases.is_a? Array -%>
+<%= "databases = " + databases.map { |i| "#{i}" }.join(" ") %>
+<% end -%>
 compress = <%= compress ? 'yes' : 'no' %>