From: Silvio Rhatto Date: Tue, 22 Mar 2016 21:12:21 +0000 (-0300) Subject: Fix deprecation warnings at sys template X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=8ac9d4cc9910af53d3e7c9e9536ed7a77d4d7122;p=puppet-backupninja.git Fix deprecation warnings at sys template --- diff --git a/templates/sys.conf.erb b/templates/sys.conf.erb index b8a542a..3761167 100644 --- a/templates/sys.conf.erb +++ b/templates/sys.conf.erb @@ -3,11 +3,10 @@ # the next time Puppet runs. Please make configuration changes to this # service in Puppet. -<% %w{parentdir packagesfile partitionsfile hardwarefile}.each do |v| - if send(v) - -%><%= v + ' = ' + send(v) + "\n" %><% - end -end -%> +<%= 'parentdir = '+ @parentdir if @parentdir %> +<%= 'packagesfile = '+ @packagesfile if @packagesfile %> +<%= 'partitionsfile = '+ @partitionsfile if @partitionsfile %> +<%= 'hardwarefile = '+ @hardwarefile if @hardwarefile %> packages = <%= @packages ? 'yes' : 'no' %> partitions = <%= @partitions ? 'yes' : 'no' %>