summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorJerome Charaoui <jcharaoui@cmaisonneuve.qc.ca>2015-03-06 16:51:24 -0500
committerJerome Charaoui <jcharaoui@cmaisonneuve.qc.ca>2015-03-06 16:51:24 -0500
commit21d8dc8652a9e8910914940cc439e7a02efbf39e (patch)
treeea01014a9257ffbb70191c7360a521f3db2402ea /templates
parent1ef94f1f2e49e032c6c416830345fc3b4beacb01 (diff)
parentb8a4f91cf2c6292d52fb9a8372292cc5a142b92d (diff)
Merge branch 'master' of git://git.sarava.org/puppet-backupninja
Conflicts: manifests/client.pp manifests/rdiff.pp
Diffstat (limited to 'templates')
-rw-r--r--templates/mysql.conf.erb2
-rw-r--r--templates/rsync.conf.erb49
2 files changed, 50 insertions, 1 deletions
diff --git a/templates/mysql.conf.erb b/templates/mysql.conf.erb
index 14905fd..82dc368 100644
--- a/templates/mysql.conf.erb
+++ b/templates/mysql.conf.erb
@@ -3,7 +3,7 @@
# the next time Puppet runs. Please make configuration changes to this
# service in Puppet.
-<% %w{user dbusername dbpassword dbhost databases backupdir vsname}.each do |v|
+<% %w{user dbusername dbpassword dbhost databases backupdir vsname sqldumpoptions}.each do |v|
if send(v)
-%><%= v + ' = ' + send(v) + "\n" %><%
end
diff --git a/templates/rsync.conf.erb b/templates/rsync.conf.erb
new file mode 100644
index 0000000..778676f
--- /dev/null
+++ b/templates/rsync.conf.erb
@@ -0,0 +1,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 -%>