]> gitweb.fluxo.info Git - puppet-backupninja.git/commitdiff
allow for a version variable override for the backupninja package,
authorMicah Anderson <micah@riseup.net>
Fri, 29 Jan 2010 17:20:53 +0000 (12:20 -0500)
committerMicah Anderson <micah@riseup.net>
Fri, 29 Jan 2010 17:20:53 +0000 (12:20 -0500)
instead of hard-coding the 0.9.6 release. This changes the installed
version to be 'installed', and lets you specify a variable if you wish
to install a different version

README
manifests/client.pp

diff --git a/README b/README
index 18192adb911ef22c3713e23ef69e3a50600ad414..5b7c2c95324cace1dd6a371c4a332f4f3c254392 100644 (file)
--- a/README
+++ b/README
@@ -47,15 +47,21 @@ You may also want to set some variables on your backup server, such as:
 Configure your backup clients
 -----------------------------
 
-Every handler that requires certain backup software to be installed,
-will handle the installation of that software, as long as you are not
-handling it elsewhere in your manifests. The handler will make sure
-that the correct version that is associated with puppet's 'installed'
-(or 'present') parameter is installed. If you need to specify a
-specific version of the programs that the class installs, you can
-specify the version you need installed by providing a variable, for
+The backupninja package and the necessary backup software will be
+installed automatically when you include any of the different handlers
+(as long as you are not handling it elsewhere in your manifests), for
 example:
 
+include backupninja::client::rdiff_backup
+
+In this case, the module will make sure that the backupninja package
+and the required rdiff-backup package are 'installed'/'present' (using
+puppet's ensure parameter language). If you need to specify a specific
+version of either backupninja itself, or the specific programs that
+the handler class installs, you can specify the version you need
+installed by providing a variable, for example:
+
+$backupninja_ensure_version = "0.9.7~bpo50+1"
 $rdiff_backup_ensure_version = "1.2.5-1~bpo40+1"
 $rsync_ensure_version = "3.0.6-1~bpo50+1"
 $duplicity_ensure_version = "0.6.04-1~bpo50+1"
index 95e3905b3f012ff6c6675fa88882280cea14af89..287b02f711fd2b7a526268b3bb9eb6883981350f 100644 (file)
@@ -32,8 +32,11 @@ class backupninja::client::defaults {
     '' => true,
     default => $ssh_dir_manage
   }
-  package { 'backupninja':
-    ensure => '0.9.6-4';
+  if !defined(Package["backupninja"]) {
+    if $backupninja_ensure_version == '' { $backupninja_ensure_version = 'installed' }
+    package { 'backupninja':
+      ensure => $backupninja_ensure_version
+    }
   }
   file { $configdir:
     ensure => directory,