From bee234d0a4e490b0531e1e23488c514dbae7d816 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Mon, 16 Aug 2010 11:47:01 -0300 Subject: Initial code for rsync handler --- templates/rsync.conf.erb | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 templates/rsync.conf.erb (limited to 'templates') diff --git a/templates/rsync.conf.erb b/templates/rsync.conf.erb new file mode 100644 index 0000000..8c61fc8 --- /dev/null +++ b/templates/rsync.conf.erb @@ -0,0 +1,44 @@ +# 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] +<%- %w{from host port user testconnect include exclude ssh protocol rsync rssync_options exclude_vserver, numericids, compress, bandwidthlimit, remote_rsync, id_file, batch, batchbase, filelist, filelistbase}.each do |v| + if has_variable?(v) and instance_variable_get("@#{v}").to_s != "false" -%> +<%= v + ' = ' + instance_variable_get("@#{v}").to_s %> +<%- + 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 -%> -- cgit v1.2.3