summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/svn.pp32
-rw-r--r--templates/svn.conf.erb10
2 files changed, 42 insertions, 0 deletions
diff --git a/manifests/svn.pp b/manifests/svn.pp
new file mode 100644
index 0000000..db46ad9
--- /dev/null
+++ b/manifests/svn.pp
@@ -0,0 +1,32 @@
+# Subversion dumps, as part of a backupninja run.
+#
+# Valid attributes for this type are:
+#
+# order: The prefix to give to the handler config filename, to set
+# order in which the actions are executed during the backup run.
+#
+# ensure: Allows you to delete an entry if you don't want it any more
+# (but be sure to keep the configdir, name, and order the same, so
+# that we can find the correct file to remove).
+#
+# user, dbusername, dbpassword, dbhost, databases, backupdir,
+# hotcopy, sqldump, compress, configfile: As defined in the
+# backupninja documentation, with the caveat that hotcopy, sqldump,
+# and compress take true/false rather than yes/no.
+#
+define backupninja::svn($order = 20,
+ $ensure = present,
+ $src = '/var/lib/svn',
+ $dest = '/var/backups/svn',
+ $tmp = '/var/backups/svn.tmp',
+ $vsname = false,
+ ) {
+ file { "${backupninja::client::configdir}/${order}_${name}.svn":
+ ensure => $ensure,
+ content => template('backupninja/svn.conf.erb'),
+ owner => root,
+ group => root,
+ mode => 0600,
+ require => File["${backupninja::client::configdir}"]
+ }
+}
diff --git a/templates/svn.conf.erb b/templates/svn.conf.erb
new file mode 100644
index 0000000..465cc67
--- /dev/null
+++ b/templates/svn.conf.erb
@@ -0,0 +1,10 @@
+# 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.
+
+<% %w{src dest tmp vsname}.each do |v|
+ if send(v)
+ -%><%= v + ' = ' + send(v) + "\n" %><%
+ end
+end -%> \ No newline at end of file