aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
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 -%>