summaryrefslogtreecommitdiff
path: root/puppet/modules/backupninja/templates/rsync.conf.erb
blob: 778676fcd9a1fb33e49127e9b2918b65aaab2eb5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# This configuration file was auto-generated by the Puppet configuration
# management system.  Any changes you make to this file will be overwritten
# the next time Puppet runs.  Please make configuration changes to this
# service in Puppet.

[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" -%>
<%= v + ' = ' + instance_variable_get("@#{v}").to_s %>
<%-
    end
end -%>

[source]
<% unless from.empty? and from.to_s != "false" -%>
from = <%= from %>
<% end -%>
<%- %w{include exclude}.each do |v|
    if has_variable?(v)
      instance_variable_get("@#{v}").to_a.each do |parameter| -%>
<%= v + ' = ' + parameter %>
<%-
      end
    end
end -%>

[dest]
<%- %w{dest testconnect ssh protocol numericids compress host port user id_file bandwidthlimit remote_rsync batch batchbase fakesuper}.each do |v|
    if has_variable?(v) and instance_variable_get("@#{v}").to_s != "false" -%>
<%= v + ' = ' + instance_variable_get("@#{v}").to_s %>
<%-
    end
end -%>

[services]
<%- %w{initscripts service}.each do |v|
    if has_variable?(v) and instance_variable_get("@#{v}").to_s != "false" -%>
<%= v + ' = ' + instance_variable_get("@#{v}").to_s %>
<%-
    end
end -%>

[system]
<%- %w{rm cp touch mv fsck}.each do |v|
    if has_variable?(v) and instance_variable_get("@#{v}").to_s != "false" -%>
<%= v + ' = ' + instance_variable_get("@#{v}").to_s %>
<%-
    end
end -%>