From: Silvio Rhatto Date: Wed, 6 Jun 2018 17:29:40 +0000 (-0300) Subject: Adds when param into backupninja::rsync X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=5af6a9bb180a263b6c0a6f3088b6c8084fd64ee8;p=puppet-backupninja.git Adds when param into backupninja::rsync --- diff --git a/manifests/rsync.pp b/manifests/rsync.pp index c760e4d..541698c 100644 --- a/manifests/rsync.pp +++ b/manifests/rsync.pp @@ -3,6 +3,7 @@ define backupninja::rsync( $order = 90, $ensure = present, + $when = false, # [general] $log = false, $partition = false, diff --git a/templates/rsync.conf.erb b/templates/rsync.conf.erb index e563838..a84b959 100644 --- a/templates/rsync.conf.erb +++ b/templates/rsync.conf.erb @@ -3,6 +3,8 @@ # the next time Puppet runs. Please make configuration changes to this # service in Puppet. +<%= 'when = '+ @when if @when != false %> + [general] <%- %w{log partition fscheck read_only mountpoint backupdir format days keepdaily keepweekly keepmonthly lockfile nicelevel enable_mv_timestamp_bug, tmp, multiconnection}.each do |v| if has_variable?(v) and instance_variable_get("@#{v}").to_s != "false" -%>