Commit 058ebe28 authored by Jerome Charaoui's avatar Jerome Charaoui

fix autoload, first attempt

parent 74ce68bc
class backupninja::client::defaults {
$configdir = $cfg_override ? {
'' => "/etc/backup.d",
default => $cfg_override,
}
$real_keystore = $backupkeystore ? {
'' => "$fileserver/keys/backupkeys",
default => $backupkeystore,
}
$real_keytype = $backupkeytype ? {
'' => 'rsa',
false => 'rsa',
default => $backupkeytype,
}
$real_keydestination = $keydestination ? {
'' => '/root/.ssh',
default => $keydestination,
}
$real_keyowner = $keyowner ? {
'' => 0,
default => $keyowner,
}
$real_keygroup = $keygroup ? {
'' => 0,
default => $keygroup,
}
$real_keymanage = $keymanage ? {
'' => true,
default => $keymanage
}
$real_ssh_dir_manage = $ssh_dir_manage ? {
'' => true,
default => $ssh_dir_manage
}
if !defined(Package["backupninja"]) {
if $backupninja_ensure_version == '' { $backupninja_ensure_version = 'installed' }
package { 'backupninja':
ensure => $backupninja_ensure_version
}
}
file { $configdir:
ensure => directory,
mode => 750, owner => 0, group => 0;
}
}
class backupninja::client inherits backupninja::client::defaults {
define key(
$user = false, $host = false, $createkey=false, $installkey=false,
......@@ -117,63 +71,3 @@ class backupninja::client inherits backupninja::client::defaults {
}
}
}
class backupninja::client::maildir inherits backupninja::client::defaults {
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::defaults {
if !defined(Package["rdiff-backup"]) {
if $rdiff_backup_ensure_version == '' { $rdiff_backup_ensure_version = 'installed' }
package { 'rdiff-backup':
ensure => $rdiff_backup_ensure_version,
}
}
}
class backupninja::client::duplicity inherits backupninja::client::defaults {
if !defined(Package["duplicity"]) {
if $duplicity_ensure_version == '' { $duplicity_ensure_version = 'installed' }
package { 'duplicity':
ensure => $duplicity_ensure_version,
}
}
}
class backupninja::client::sys inherits backupninja::client::defaults {
case $operatingsystem {
debian,ubuntu: {
if !defined(Package["debconf-utils"]) {
if $debconf_utils_ensure_version == '' { $debconf_utils_ensure_version = 'installed' }
package { 'debconf-utils':
ensure => $debconf_utils_ensure_version,
}
}
if !defined(Package["hwinfo"]) {
if $hwinfo_ensure_version == '' { $hwinfo_ensure_version = 'installed' }
package { 'hwinfo':
ensure => $hwinfo_ensure_version,
}
}
}
default: {}
}
}
class backupninja::client::rsync inherits backupninja::client::defaults {
if !defined(Package["rsync"]) {
if $rsync_ensure_version == '' { $rsync_ensure_version = 'installed' }
package { 'rsync':
ensure => $rsync_ensure_version,
}
}
}
class backupninja::client::defaults {
$configdir = $cfg_override ? {
'' => "/etc/backup.d",
default => $cfg_override,
}
$real_keystore = $backupkeystore ? {
'' => "$fileserver/keys/backupkeys",
default => $backupkeystore,
}
$real_keytype = $backupkeytype ? {
'' => 'rsa',
false => 'rsa',
default => $backupkeytype,
}
$real_keydestination = $keydestination ? {
'' => '/root/.ssh',
default => $keydestination,
}
$real_keyowner = $keyowner ? {
'' => 0,
default => $keyowner,
}
$real_keygroup = $keygroup ? {
'' => 0,
default => $keygroup,
}
$real_keymanage = $keymanage ? {
'' => true,
default => $keymanage
}
$real_ssh_dir_manage = $ssh_dir_manage ? {
'' => true,
default => $ssh_dir_manage
}
if !defined(Package["backupninja"]) {
if $backupninja_ensure_version == '' { $backupninja_ensure_version = 'installed' }
package { 'backupninja':
ensure => $backupninja_ensure_version
}
}
file { $configdir:
ensure => directory,
mode => 750, owner => 0, group => 0;
}
}
class backupninja::client::duplicity inherits backupninja::client::defaults {
if !defined(Package["duplicity"]) {
if $duplicity_ensure_version == '' { $duplicity_ensure_version = 'installed' }
package { 'duplicity':
ensure => $duplicity_ensure_version,
}
}
}
class backupninja::client::maildir inherits backupninja::client::defaults {
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::defaults {
if !defined(Package["rdiff-backup"]) {
if $rdiff_backup_ensure_version == '' { $rdiff_backup_ensure_version = 'installed' }
package { 'rdiff-backup':
ensure => $rdiff_backup_ensure_version,
}
}
}
class backupninja::client::rsync inherits backupninja::client::defaults {
if !defined(Package["rsync"]) {
if $rsync_ensure_version == '' { $rsync_ensure_version = 'installed' }
package { 'rsync':
ensure => $rsync_ensure_version,
}
}
}
class backupninja::client::sys inherits backupninja::client::defaults {
case $operatingsystem {
debian,ubuntu: {
if !defined(Package["debconf-utils"]) {
if $debconf_utils_ensure_version == '' { $debconf_utils_ensure_version = 'installed' }
package { 'debconf-utils':
ensure => $debconf_utils_ensure_version,
}
}
if !defined(Package["hwinfo"]) {
if $hwinfo_ensure_version == '' { $hwinfo_ensure_version = 'installed' }
package { 'hwinfo':
ensure => $hwinfo_ensure_version,
}
}
}
default: {}
}
}
......@@ -18,21 +18,3 @@ define backupninja::config(
mode => 0644
}
}
# Write the backupninja cron job, allowing you to specify an alternate backupninja
# command (if you want to wrap it in any other commands, e.g. to allow it to use
# the monkeysphere for authentication), or a different schedule to run it on.
define backupninja::cron(
$backupninja_cmd = '/usr/sbin/backupninja',
$backupninja_test_cmd = $backupninja_cmd,
$cronfile = "/etc/cron.d/backupninja",
$min = "0", $hour = "*", $dom = "*", $month = "*",
$dow = "*")
{
file { $cronfile:
content => template('backupninja/backupninja.cron.erb'),
owner => root,
group => root,
mode => 0644
}
}
# Write the backupninja cron job, allowing you to specify an alternate backupninja
# command (if you want to wrap it in any other commands, e.g. to allow it to use
# the monkeysphere for authentication), or a different schedule to run it on.
define backupninja::cron(
$backupninja_cmd = '/usr/sbin/backupninja',
$backupninja_test_cmd = $backupninja_cmd,
$cronfile = "/etc/cron.d/backupninja",
$min = "0", $hour = "*", $dom = "*", $month = "*",
$dow = "*")
{
file { $cronfile:
content => template('backupninja/backupninja.cron.erb'),
owner => root,
group => root,
mode => 0644
}
}
import "client.pp"
import "config.pp"
import "dup.pp"
import "labelmount.pp"
import "maildir.pp"
import "mysql.pp"
import "pgsql.pp"
import "rdiff.pp"
import "server.pp"
import "sh.pp"
import "svn.pp"
import "sys.pp"
class backupninja {
}
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