From bfce265ba43643d8b3b3f486152663431c9a83da Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 22 Mar 2016 18:25:11 -0300 Subject: Fix deprecation warnings at mysql template --- templates/mysql.conf.erb | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) 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' %> -- cgit v1.2.3