From cbcacb7da154f1be8105ef69466744889b2b6c45 Mon Sep 17 00:00:00 2001 From: Matt Taggart Date: Wed, 15 Jul 2009 13:05:21 -0700 Subject: create subclasses for maildir and rdiff-backup. If you are using these features of backupninja, you'll want to switch to doing "include backupninja::client::maildir" for the machines that need it and this will pull in backupninja::client, so you don't need to include that anymore if you were explicitly doing so for those machines (although it shouldn't hurt). Right now what using these new subclasses will get you is dependencies on needed packages, but in the future there might be more. --- manifests/client.pp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'manifests') diff --git a/manifests/client.pp b/manifests/client.pp index 66dbd1c..999108c 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -86,4 +86,28 @@ class backupninja::client { } } +class backupninja::client::maildir inherits backupninja::client { + case $rsync_ensure_version { + '': { $rsync_ensure_version = "present" } + } + if !defined(Package["rsync"]) { + if $rsync_ensure_version == '' { $rsync_ensure_version = 'installed' } + package { 'rsync': + ensure => $rsync_ensure_version, + } + } +} + +class backupninja::client::rdiff-backup inherits backupninja::client { + case $rdiff-backup_ensure_version { + '': { $rdiff-backup_ensure_version = "present" } + } + + if !defined(Package["rdiff-backup"]) { + if $rdiff-backup_ensure_version == '' { $rdiff-backup_ensure_version = 'installed' } + package { 'rdiff-backup': + ensure => $rdiff-backup_ensure_version, + } + } +} -- cgit v1.2.3