aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-01-24 21:12:21 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-01-24 21:12:21 -0200
commitbbd22aadc2cd8622245f10a395aa2f0fe12a21b1 (patch)
treed4cfb2f039987e5f1b23e031a676f58a88a441cb
parent16e96dc754f0ddc516c9a8aaba8e792317e632e6 (diff)
downloadpuppet-nodo-bbd22aadc2cd8622245f10a395aa2f0fe12a21b1.tar.gz
puppet-nodo-bbd22aadc2cd8622245f10a395aa2f0fe12a21b1.tar.bz2
Managing local encrypted backup
-rw-r--r--manifests/nodo.pp23
1 files changed, 23 insertions, 0 deletions
diff --git a/manifests/nodo.pp b/manifests/nodo.pp
index 6259cd3..64f2592 100644
--- a/manifests/nodo.pp
+++ b/manifests/nodo.pp
@@ -16,8 +16,31 @@ class nodo {
class { 'puppetd': }
}
+ #
+ # Backup
+ #
class { 'backup': }
+ $local_backup = hiera('nodo::backup::localhost', false)
+
+ # Local encrypted backup
+ case $local_backup {
+ true,enabled,present: {
+ backup::duplicity { "localhost":
+ encryptkey => hiera('nodo::backup::encryptkey'),
+ password => hiera('nodo::backup::password'),
+ }
+ }
+ absent {
+ backup::duplicity { "localhost":
+ encryptkey => hiera('nodo::backup::encryptkey'),
+ password => hiera('nodo::backup::password'),
+ ensure => absent,
+ }
+ }
+ default { }
+ }
+
# Does not work well inside vservers
class { 'runit': ensure => absent }