aboutsummaryrefslogtreecommitdiff
path: root/manifests/subsystem/backup.pp
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-04-14 15:12:28 -0300
committerSilvio Rhatto <rhatto@riseup.net>2013-04-14 15:12:28 -0300
commit3f2aad8d17bde2354ad6d222d85d7281c40391b5 (patch)
treec8f290a1d6609baf41e97017c4e10022c1fdbe9e /manifests/subsystem/backup.pp
parent11466421c5c5ebb56d345b8f100e22fcd4b539ce (diff)
downloadpuppet-nodo-3f2aad8d17bde2354ad6d222d85d7281c40391b5.tar.gz
puppet-nodo-3f2aad8d17bde2354ad6d222d85d7281c40391b5.tar.bz2
Splitting nodo code into subsystems
Diffstat (limited to 'manifests/subsystem/backup.pp')
-rw-r--r--manifests/subsystem/backup.pp26
1 files changed, 26 insertions, 0 deletions
diff --git a/manifests/subsystem/backup.pp b/manifests/subsystem/backup.pp
new file mode 100644
index 0000000..eb3dafc
--- /dev/null
+++ b/manifests/subsystem/backup.pp
@@ -0,0 +1,26 @@
+class nodo::subsystem::backup {
+ #
+ # Backup
+ #
+ class { 'backup': }
+
+ $local_backup = hiera('nodo::subsystem::backup::localhost', false)
+
+ # Local encrypted backup
+ case $local_backup {
+ true,enabled,present: {
+ backup::duplicity { "localhost":
+ encryptkey => hiera('nodo::subsystem::backup::encryptkey'),
+ password => hiera('nodo::subsystem::backup::password'),
+ }
+ }
+ absent: {
+ backup::duplicity { "localhost":
+ encryptkey => hiera('nodo::subsystem::backup::encryptkey'),
+ password => hiera('nodo::subsystem::backup::password'),
+ ensure => absent,
+ }
+ }
+ default: { }
+ }
+}