aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2008-05-20 20:31:05 +0000
committerMicah Anderson <micah@riseup.net>2008-05-20 20:31:05 +0000
commitd9b765d66ef377532b803d570af27b5dcb2a119a (patch)
tree948b5ae4749c6c5a91f205a7401003fcda905f20
parent4d73ad490fa3a5051be2ac6caf88095a5f45039f (diff)
downloadpuppet-backupninja-d9b765d66ef377532b803d570af27b5dcb2a119a.tar.gz
puppet-backupninja-d9b765d66ef377532b803d570af27b5dcb2a119a.tar.bz2
harmonize spacing to be consistant
-rw-r--r--manifests/client.pp20
-rw-r--r--manifests/server.pp112
2 files changed, 66 insertions, 66 deletions
diff --git a/manifests/client.pp b/manifests/client.pp
index ceb3efb..fed83e6 100644
--- a/manifests/client.pp
+++ b/manifests/client.pp
@@ -1,12 +1,12 @@
class backupninja::client {
- $configdir = $cfg_override ? {
- '' => "/etc/backup.d",
- default => $cfg_override,
- }
- package { 'backupninja':
- ensure => '0.9.5-3';
- }
- file { $configdir:
- ensure => directory
- }
+ $configdir = $cfg_override ? {
+ '' => "/etc/backup.d",
+ default => $cfg_override,
+ }
+ package { 'backupninja':
+ ensure => '0.9.5-3';
+ }
+ file { $configdir:
+ ensure => directory
+ }
}
diff --git a/manifests/server.pp b/manifests/server.pp
index 34091d1..5a2fe09 100644
--- a/manifests/server.pp
+++ b/manifests/server.pp
@@ -1,63 +1,63 @@
class backupninja::server {
- $backupdir = $backupdir_override ? {
- '' => "/backup",
- default => $backupdir_override,
+ $backupdir = $backupdir_override ? {
+ '' => "/backup",
+ default => $backupdir_override,
+ }
+ group { "backupninjas":
+ ensure => "present",
+ gid => 700
+ }
+ file { "$backupdir":
+ ensure => "directory",
+ mode => 710, owner => root, group => "backupninjas"
+ }
+ User <<| tag == "backupninja-$fqdn" |>>
+ File <<| tag == "backupninja-$fqdn" |>>
+
+ # this define allows nodes to declare a remote backup sandbox, that have to
+ # get created on the server
+ define sandbox($host = false, $dir = false, $uid = false, $gid = "backupninjas") {
+ $real_host = $host ? {
+ false => $fqdn,
+ default => $host,
}
- group { "backupninjas":
- ensure => "present",
- gid => 700
+ $real_dir = $dir ? {
+ false => "${backupninja::server::backupdir}/$fqdn",
+ default => $dir,
}
- file { "$backupdir":
- ensure => "directory",
- mode => 710, owner => root, group => "backupninjas"
+ @@file { "$real_dir":
+ ensure => "directory",
+ mode => 750, owner => $name, group => 0,
+ tag => "backupninja-$real_host",
}
- User <<| tag == "backupninja-$fqdn" |>>
- File <<| tag == "backupninja-$fqdn" |>>
-
- # this define allows nodes to declare a remote backup sandbox, that have to
- # get created on the server
- define sandbox($host = false, $dir = false, $uid = false, $gid = "backupninjas") {
- $real_host = $host ? {
- false => $fqdn,
- default => $host,
- }
- $real_dir = $dir ? {
- false => "${backupninja::server::backupdir}/$fqdn",
- default => $dir,
- }
- @@file { "$real_dir":
- ensure => "directory",
- mode => 750, owner => $name, group => 0,
- tag => "backupninja-$real_host",
- }
- case $uid {
- false: {
- @@user { "$name":
- ensure => "present",
- gid => "$gid",
- comment => "$name backup sandbox",
- home => "$real_dir",
- managehome => true,
- shell => "/bin/sh",
- password => '*',
- require => Group['backupninjas'],
- tag => "backupninja-$real_host"
- }
- }
- default: {
- @@user { "$name":
- ensure => "present",
- uid => "$uid",
- gid => "$gid",
- comment => "$name backup sandbox",
- home => "$real_dir",
- managehome => true,
- shell => "/bin/sh",
- password => '*',
- require => Group['backupninjas'],
- tag => "backupninja-$real_host"
- }
- }
+ case $uid {
+ false: {
+ @@user { "$name":
+ ensure => "present",
+ gid => "$gid",
+ comment => "$name backup sandbox",
+ home => "$real_dir",
+ managehome => true,
+ shell => "/bin/sh",
+ password => '*',
+ require => Group['backupninjas'],
+ tag => "backupninja-$real_host"
+ }
+ }
+ default: {
+ @@user { "$name":
+ ensure => "present",
+ uid => "$uid",
+ gid => "$gid",
+ comment => "$name backup sandbox",
+ home => "$real_dir",
+ managehome => true,
+ shell => "/bin/sh",
+ password => '*',
+ require => Group['backupninjas'],
+ tag => "backupninja-$real_host"
}
+ }
}
+ }
}