summaryrefslogtreecommitdiff
path: root/manifests/sys.pp
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2008-05-17 23:31:41 +0000
committerMicah Anderson <micah@riseup.net>2008-05-17 23:31:41 +0000
commitf80945b89753bd9a75d2898beb80587185e39abc (patch)
tree7a7b08b9e0c02cd03804a1369355bd5682cafe43 /manifests/sys.pp
parent6406454bbf71595c511d8ccf838a6007b4fe1e5e (diff)
add a sys backupninja module piece
Diffstat (limited to 'manifests/sys.pp')
-rw-r--r--manifests/sys.pp33
1 files changed, 33 insertions, 0 deletions
diff --git a/manifests/sys.pp b/manifests/sys.pp
new file mode 100644
index 0000000..4829a15
--- /dev/null
+++ b/manifests/sys.pp
@@ -0,0 +1,33 @@
+# sys handler, 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).
+#
+#
+define backupninja::sys($order = 30,
+ $ensure = present,
+ $parentdir = '/var/backups',
+ $packages = yes,
+ $packagesfile = '/var/backups/dpkg-selections.txt',
+ $partitions = yes,
+ $partitionsfile = '/var/backups/partitions.__star__.txt',
+ $dosfdisk = yes,
+ $hardware = yes,
+ $hardwarefile = '/var/backups/hardware.txt',
+ $dohwinfo = yes,
+ ) {
+ file { "${backupninja::client::configdir}/${order}_${name}.sys":
+ ensure => $ensure,
+ content => template('backupninja/sys.conf.erb'),
+ owner => root,
+ group => root,
+ mode => 0600,
+ require => File["${backupninja::client::configdir}"]
+ }
+}