From: Silvio Rhatto Date: Tue, 22 Mar 2016 21:25:11 +0000 (-0300) Subject: Fix deprecation warnings at mysql template X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=bfce265ba43643d8b3b3f486152663431c9a83da;p=puppet-backupninja.git Fix deprecation warnings at mysql template --- diff --git a/templates/mysql.conf.erb b/templates/mysql.conf.erb index ad47f15..f14fadd 100644 --- a/templates/mysql.conf.erb +++ b/templates/mysql.conf.erb @@ -3,11 +3,14 @@ # the next time Puppet runs. Please make configuration changes to this # service in Puppet. -<% %w{user dbusername dbpassword dbhost databases backupdir vsname sqldumpoptions}.each do |v| - if send(v) - -%><%= v + ' = ' + send(v) + "\n" %><% - end -end -%> +<%= 'user = '+ @user if @user %> +<%= 'dbusername = '+ @dbusername if @dbusername %> +<%= 'dbpassword = '+ @dbpassword if @dbpassword %> +<%= 'dbhost = '+ @dbhost if @dbhost %> +<%= 'databases = '+ @databases if @databases %> +<%= 'backupdir = '+ @backupdir if @backupdir %> +<%= 'vsname = '+ @vsname if @vsname %> +<%= 'sqldumpoptions = '+ @sqldumpoptions if @sqldumpoptions %> hotcopy = <%= @hotcopy ? 'yes' : 'no' %> sqldump = <%= @sqldump ? 'yes' : 'no' %>