Allow to pass extra attributes to backup PostgreSQL databases

This commit is contained in:
Greg Karékinian
2019-05-14 16:39:21 +02:00
parent c9547582b7
commit d398c167ca
4 changed files with 26 additions and 20 deletions

View File

@@ -17,9 +17,14 @@ KosmosBackup.new(:default, 'default backup') do
<%- end -%>
<%- if node["backup"]["postgresql"] -%>
<%- node["backup"]["postgresql"]["databases"].each do |db_name| -%>
database PostgreSQL, :"<%= db_name.to_sym %>" do |db|
<%- node["backup"]["postgresql"]["databases"].each do |db_name, h| -%>
database PostgreSQL, :"<%= db_name %>" do |db|
db.name = "<%= db_name %>"
<%- unless h.nil? -%>
<%- h.each do |k, v| -%>
db.<%= k %> = "<%= v %>"
<%- end -%>
<%- end -%>
end
<%- end -%>
<%- end -%>