aboutsummaryrefslogtreecommitdiff
path: root/manifests/subsystem/backup.pp
blob: 3dc2c8a73832768fc0c80e342143c1ec4a273ebc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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: { }
  }
}