aboutsummaryrefslogtreecommitdiff
path: root/manifests/sh.pp
diff options
context:
space:
mode:
authorPietro <pietro@riseup.net>2008-07-08 18:43:42 +0000
committerPietro <pietro@riseup.net>2008-07-08 18:43:42 +0000
commit6b09aba10d292c47423cbab283f89f2490b2a3f8 (patch)
tree492f38e8dead21303ab2ec493469bdf74f6a09d1 /manifests/sh.pp
parent05b987d4d81e8d46203a9dc368eab25c8b973dfc (diff)
downloadpuppet-backupninja-6b09aba10d292c47423cbab283f89f2490b2a3f8.tar.gz
puppet-backupninja-6b09aba10d292c47423cbab283f89f2490b2a3f8.tar.bz2
sh backupninja handler.
Diffstat (limited to 'manifests/sh.pp')
-rw-r--r--manifests/sh.pp26
1 files changed, 26 insertions, 0 deletions
diff --git a/manifests/sh.pp b/manifests/sh.pp
new file mode 100644
index 0000000..77d7fb8
--- /dev/null
+++ b/manifests/sh.pp
@@ -0,0 +1,26 @@
+# sh 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::sh($order = 30,
+ $ensure = present,
+ $command_string
+ ) {
+ include backupninja::client
+ file { "${backupninja::client::configdir}/${order}_${name}.sh":
+ ensure => $ensure,
+ content => template('backupninja/sh.conf.erb'),
+ owner => root,
+ group => root,
+ mode => 0600,
+ require => File["${backupninja::client::configdir}"]
+ }
+}