Commit 87ddb3e4 authored by Jerome Charaoui's avatar Jerome Charaoui

move ensure_* package dependency parameters to backupninja::client

parent e0e5f239
class backupninja::client (
$ensure_backupninja_version = 'installed',
$ensure_rsync_version = 'installed',
$ensure_rdiffbackup_version = 'installed',
$ensure_debconfutils_version = 'installed',
$ensure_hwinfo_version = 'installed',
$ensure_duplicity_version = 'installed',
$configdir = '/etc/backup.d',
$keystore = "${::fileserver}/keys/backupkeys",
$keystorefspath = false,
......
......@@ -39,7 +39,6 @@
# testing debian repositories by the time of this writing.
define backupninja::duplicity( $order = 90,
$ensure = present,
$ensure_duplicity_version = 'installed',
# options to the config file
$options = false,
$nicelevel = false,
......@@ -98,7 +97,7 @@ define backupninja::duplicity( $order = 90,
$installkey = true ) {
# install client dependencies
ensure_resource('package', 'duplicity', {'ensure' => $ensure_duplicity_version})
ensure_resource('package', 'duplicity', {'ensure' => $backupninja::client::ensure_duplicity_version})
case $desthost { false: { err("need to define a destination host for remote backups!") } }
case $destdir { false: { err("need to define a destination directory for remote backups!") } }
......
......@@ -17,14 +17,14 @@
#
#
define backupninja::maildir(
$order = 99, $ensure = present, $ensure_rsync_version = 'installed',
$order = 99, $ensure = present,
$when = 'everyday at 21:00', $srcdir = false,
$destdir = false, $desthost = false, $destuser = false, $destid_file = false,
$remove = false, $multiconnection = yes, $keepdaily='4', $keepweekly='2',
$keepmonthly='2')
{
# install client dependencies
ensure_resource('package', 'rsync', {'ensure' => $ensure_rsync_version})
ensure_resource('package', 'rsync', {'ensure' => $backupninja::client::ensure_rsync_version})
case $srcdir { false: { err("need to define a source directory to backup!") } }
case $destdir { false: { err("need to define a destination directory to backup!") } }
......
......@@ -16,7 +16,7 @@
# directories.
#
define backupninja::rdiff(
$order = 90, $ensure = present, $ensure_rdiffbackup_version = 'installed',
$order = 90, $ensure = present,
$user = false, $home = "/home/${user}-${name}", $host = false,
$type = 'local',
$exclude = [ "/home/*/.gnupg", "/home/*/.local/share/Trash", "/home/*/.Trash",
......@@ -30,7 +30,7 @@ define backupninja::rdiff(
$extras = false, $nagios_description = 'backups')
{
# install client dependencies
ensure_resource('package', 'rdiff-backup', {'ensure' => $ensure_rdiffbackup_version})
ensure_resource('package', 'rdiff-backup', {'ensure' => $backupninja::client::ensure_rdiffbackup_version})
$directory = "$home/rdiff-backup/"
......
......@@ -2,7 +2,7 @@
# Based on backupninja::rdiff
define backupninja::rsync(
$order = 90, $ensure = present, $ensure_rsync_version = 'installed',
$order = 90, $ensure = present,
$user = false, $home = false, $host = false,
$ssh_dir_manage = true, $ssh_dir = false, $authorized_keys_file = false,
$installuser = true, $installkey = true, $key = false, $backuptag = false,
......@@ -31,7 +31,7 @@ define backupninja::rsync(
$rm = false, $cp = false, $touch = false, $mv = false, $fsck = false)
{
# install client dependencies
ensure_resource('package', 'rsync', {'ensure' => $ensure_rsync_version})
ensure_resource('package', 'rsync', {'ensure' => $backupninja::client::ensure_rsync_version})
# Right now just local origin with remote destination is supported.
$from = 'local'
......
......@@ -12,8 +12,6 @@
#
define backupninja::sys($order = 30,
$ensure = present,
$ensure_debconfutils_version = 'installed',
$ensure_hwinfo_version = 'installed',
$parentdir = '/var/backups',
$packages = true,
$packagesfile = '/var/backups/dpkg-selections.txt',
......@@ -30,8 +28,8 @@ define backupninja::sys($order = 30,
# install client dependencies
case $operatingsystem {
debian,ubuntu: {
ensure_resource('package', 'debconf-utils', {'ensure' => $ensure_debconfutils_version})
ensure_resource('package', 'hwinfo', {'ensure' => $ensure_hwinfo_version})
ensure_resource('package', 'debconf-utils', {'ensure' => $backupninja::client::ensure_debconfutils_version})
ensure_resource('package', 'hwinfo', {'ensure' => $backupninja::client::ensure_hwinfo_version})
}
default: {}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment