diff options
author | Jerome Charaoui <jcharaoui@cmaisonneuve.qc.ca> | 2015-03-27 17:35:21 -0400 |
---|---|---|
committer | Jerome Charaoui <jcharaoui@cmaisonneuve.qc.ca> | 2015-04-17 17:12:16 -0400 |
commit | 87ddb3e4260b47f0fc99f84d1818145af5be3e36 (patch) | |
tree | 971f5a80f2a3e8bf0420498a8536be08260aae32 /manifests | |
parent | e0e5f239e3ef407fa0ad8c6f0f350c64d33ccc85 (diff) | |
download | puppet-backupninja-87ddb3e4260b47f0fc99f84d1818145af5be3e36.tar.gz puppet-backupninja-87ddb3e4260b47f0fc99f84d1818145af5be3e36.tar.bz2 |
move ensure_* package dependency parameters to backupninja::client
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/client.pp | 5 | ||||
-rw-r--r-- | manifests/duplicity.pp | 3 | ||||
-rw-r--r-- | manifests/maildir.pp | 4 | ||||
-rw-r--r-- | manifests/rdiff.pp | 4 | ||||
-rw-r--r-- | manifests/rsync.pp | 4 | ||||
-rw-r--r-- | manifests/sys.pp | 6 |
6 files changed, 14 insertions, 12 deletions
diff --git a/manifests/client.pp b/manifests/client.pp index 3239cde..9252dc6 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -1,5 +1,10 @@ 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, diff --git a/manifests/duplicity.pp b/manifests/duplicity.pp index fa68324..8c48793 100644 --- a/manifests/duplicity.pp +++ b/manifests/duplicity.pp @@ -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!") } } diff --git a/manifests/maildir.pp b/manifests/maildir.pp index a7bb1e5..c39dcf2 100644 --- a/manifests/maildir.pp +++ b/manifests/maildir.pp @@ -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!") } } diff --git a/manifests/rdiff.pp b/manifests/rdiff.pp index bf5dc42..8f349e6 100644 --- a/manifests/rdiff.pp +++ b/manifests/rdiff.pp @@ -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/" diff --git a/manifests/rsync.pp b/manifests/rsync.pp index 612d1af..0f730a0 100644 --- a/manifests/rsync.pp +++ b/manifests/rsync.pp @@ -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' diff --git a/manifests/sys.pp b/manifests/sys.pp index d2b4aa9..6fca2f0 100644 --- a/manifests/sys.pp +++ b/manifests/sys.pp @@ -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: {} } |