aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2018-05-23 08:57:32 -0300
committerSilvio Rhatto <rhatto@riseup.net>2018-05-23 08:57:32 -0300
commitab1896ad3e9f685ae96b09410936df63f8642dfa (patch)
tree0bb1e66d35120ecaa5f53604eb3533c3d32f09a6
parentbf195d027e5653a7a18921a77817553d361b7272 (diff)
downloadpuppet-backup-ab1896ad3e9f685ae96b09410936df63f8642dfa.tar.gz
puppet-backup-ab1896ad3e9f685ae96b09410936df63f8642dfa.tar.bz2
Manage users folder and ensure latest borgbackup package
-rw-r--r--manifests/init.pp9
-rw-r--r--manifests/params.pp1
2 files changed, 9 insertions, 1 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index a4492ca..f4ce07c 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -46,7 +46,7 @@ class backup(
}
package { "duplicity": ensure => installed, }
- package { "borgbackup": ensure => installed, }
+ package { "borgbackup": ensure => latest, }
package { "debconf-utils": ensure => installed, }
# See http://www.rfc3092.net/2013/09/missing-modules-for-paramiko-and-gio-in-duplicity-foo/
@@ -64,6 +64,13 @@ class backup(
mode => '0755',
}
+ file { "${backup::params::backupdir_users}":
+ ensure => directory,
+ owner => root,
+ group => root,
+ mode => '0755',
+ }
+
file { "/var/log/backup":
ensure => directory,
owner => root,
diff --git a/manifests/params.pp b/manifests/params.pp
index e94e1d3..81b6fd4 100644
--- a/manifests/params.pp
+++ b/manifests/params.pp
@@ -2,6 +2,7 @@ class backup::params {
# backup folder
$backupdir = "/var/backups"
$backupdir_remote = "$backupdir/remote"
+ $backupdir_users = "$backupdir/users"
$backupdir_ensure = hiera('backup::dir::ensure', 'directory')
# for data that's going to be encrypted and signed