aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorAntoine Beaupre <anarcat@koumbit.org>2009-09-24 12:16:03 -0400
committerAntoine Beaupre <anarcat@koumbit.org>2009-09-24 12:16:03 -0400
commit343f27fa91865c0c20f633f36048f8d61179fb02 (patch)
treeecc6f2e8aa1616d04d4cc6e550ff35fec9b34f44 /templates
parentde010623a8594900b9661db9c0dc8707a1e402fe (diff)
parent70cae2f75b1938ac26a75597a8e75dc3e7d327b7 (diff)
downloadpuppet-backupninja-343f27fa91865c0c20f633f36048f8d61179fb02.tar.gz
puppet-backupninja-343f27fa91865c0c20f633f36048f8d61179fb02.tar.bz2
Merge commit 'micah/master'
Conflicts: manifests/mysql.pp manifests/rdiff.pp manifests/server.pp
Diffstat (limited to 'templates')
-rw-r--r--templates/dup.conf.erb43
-rw-r--r--templates/rdiff.conf.erb26
2 files changed, 48 insertions, 21 deletions
diff --git a/templates/dup.conf.erb b/templates/dup.conf.erb
new file mode 100644
index 0000000..ce77a5c
--- /dev/null
+++ b/templates/dup.conf.erb
@@ -0,0 +1,43 @@
+# 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.
+
+<%= 'options = ' + options if options %>
+<%= 'nicelevel = ' + nicelevel if nicelevel %>
+<%= 'testconnect = ' + testconnect if testconnect %>
+<%= 'tmpdir = ' + tmpdir if tmpdir %>
+
+[gpg]
+<%= 'sign = ' + sign if sign %>
+<%= 'encryptkey = ' + encryptkey if encryptkey %>
+<%= 'signkey = ' + signkey if signkey %>
+<%= 'password = ' + password if password %>
+
+[source]
+<% if include.is_a? String -%>
+<%= 'include = ' + include %>
+<% elsif include.is_a? Array -%>
+<%= include.map { |i| "include = #{i}" }.join("\n") %>
+<% end -%>
+
+<% if exclude.is_a? String -%>
+<%= 'exclude = ' + exclude %>
+<% elsif exclude.is_a? Array -%>
+<%= exclude.map { |i| "exclude = #{i}" }.join("\n") %>
+<% end -%>
+
+<% if vsinclude.is_a? String -%>
+<%= 'vsinclude = ' + vsinclude %>
+<% elsif vsinclude.is_a? Array -%>
+<%= vsinclude.map { |i| "vsinclude = #{i}" }.join("\n") %>
+<% end -%>
+
+[dest]
+<%= 'incremental = ' + incremental if incremental %>
+<%= 'keep = ' + keep if keep %>
+<%= 'bandwithlimit = ' + bandwithlimit if bandwithlimit %>
+<%= 'sshoptions = ' + sshoptions if sshoptions %>
+<%= 'destdir = ' + destdir if destdir %>
+<%= 'desthost = ' + desthost if desthost %>
+<%= 'destuser = ' + destuser if destuser %>
diff --git a/templates/rdiff.conf.erb b/templates/rdiff.conf.erb
index 99bda4e..23c336f 100644
--- a/templates/rdiff.conf.erb
+++ b/templates/rdiff.conf.erb
@@ -30,25 +30,9 @@ type = local
<% end -%>
[dest]
-<%- include Puppet::Util::Package
- class VersionComparer; extend Puppet::Util::Package; end
-
- if VersionComparer.versioncmp(Puppet.version,'0.24.6') >= 0
- %w{type host directory user sshoptions}.each do |v|
- if has_variable?(v)
- -%>
+<%- %w{type host directory user sshoptions}.each do |v|
+ if has_variable?(v) and instance_variable_get("@#{v}").to_s != "false" -%>
<%= v + ' = ' + instance_variable_get("@#{v}").to_s %>
- <%-
- end
- end
- %>
-<%- else -%>
- <%- %w{type host directory user sshoptions}.each do |v|
- if @scope.lookupvar(v)
- -%>
-<%= v + ' = ' + @scope.lookupvar(v) %>
- <%-
- end
- end
- %>
-<%- end -%>
+<%-
+ end
+end -%>