]> gitweb.fluxo.info Git - puppet-backup.git/commitdiff
Adds backup::user
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 23 Jun 2016 17:40:31 +0000 (14:40 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 23 Jun 2016 17:40:31 +0000 (14:40 -0300)
manifests/user.pp [new file with mode: 0644]

diff --git a/manifests/user.pp b/manifests/user.pp
new file mode 100644 (file)
index 0000000..4b60f97
--- /dev/null
@@ -0,0 +1,16 @@
+# Inspired by backupninja::sandbox
+class backup::user(
+  $ensure         = present,
+  $hosting_domain = $::domain,
+  $sshkey         = hiera("compiled::ssh::key::${name}.${hosting_domain}"),
+) {
+  user::manage { $name:
+    ensure   => $ensure,
+    password => '*',
+    comment  => "$name backup sandbox",
+    gid      => 'backupninjas',
+    shell    => '/bin/bash',
+    homedir  => "${::backup::params::backupdir_remote}/${name}.${hosting_domain}",
+    sshkey   => $sshkey,
+  }
+}