Commit d18c3e03 authored by Jerome Charaoui's avatar Jerome Charaoui

Rename backupninja::client class to backupninja

parent 87ddb3e4
......@@ -97,7 +97,7 @@ define backupninja::duplicity( $order = 90,
$installkey = true ) {
# install client dependencies
ensure_resource('package', 'duplicity', {'ensure' => $backupninja::client::ensure_duplicity_version})
ensure_resource('package', 'duplicity', {'ensure' => $backupninja::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!") } }
......@@ -118,7 +118,7 @@ define backupninja::duplicity( $order = 90,
}
# the client's ssh key
backupninja::client::key { "${destuser}-${name}":
backupninja::key { "${destuser}-${name}":
user => $destuser,
host => $desthost,
createkey => $createkey,
......
class backupninja::client (
class backupninja (
$ensure_backupninja_version = 'installed',
$ensure_rsync_version = 'installed',
$ensure_rdiffbackup_version = 'installed',
......
......@@ -24,7 +24,7 @@ define backupninja::maildir(
$keepmonthly='2')
{
# install client dependencies
ensure_resource('package', 'rsync', {'ensure' => $backupninja::client::ensure_rsync_version})
ensure_resource('package', 'rsync', {'ensure' => $backupninja::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!") } }
......
......@@ -30,7 +30,7 @@ define backupninja::rdiff(
$extras = false, $nagios_description = 'backups')
{
# install client dependencies
ensure_resource('package', 'rdiff-backup', {'ensure' => $backupninja::client::ensure_rdiffbackup_version})
ensure_resource('package', 'rdiff-backup', {'ensure' => $backupninja::ensure_rdiffbackup_version})
$directory = "$home/rdiff-backup/"
......@@ -51,7 +51,7 @@ define backupninja::rdiff(
nagios_description => $nagios_description
}
backupninja::client::key
backupninja::key
{
"${user}-${name}": user => $user, host => $host,
installkey => $installkey,
......
......@@ -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' => $backupninja::client::ensure_rsync_version})
ensure_resource('package', 'rsync', {'ensure' => $backupninja::ensure_rsync_version})
# Right now just local origin with remote destination is supported.
$from = 'local'
......@@ -68,7 +68,7 @@ define backupninja::rsync(
nagios_description => $nagios_description
}
backupninja::client::key { "${user}-${name}":
backupninja::key { "${user}-${name}":
user => $user,
host => $host,
installkey => $installkey,
......
......@@ -28,8 +28,8 @@ define backupninja::sys($order = 30,
# install client dependencies
case $operatingsystem {
debian,ubuntu: {
ensure_resource('package', 'debconf-utils', {'ensure' => $backupninja::client::ensure_debconfutils_version})
ensure_resource('package', 'hwinfo', {'ensure' => $backupninja::client::ensure_hwinfo_version})
ensure_resource('package', 'debconf-utils', {'ensure' => $backupninja::ensure_debconfutils_version})
ensure_resource('package', 'hwinfo', {'ensure' => $backupninja::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