Index: modules/adblockplus/manifests/user.pp |
=================================================================== |
--- a/modules/adblockplus/manifests/user.pp |
+++ b/modules/adblockplus/manifests/user.pp |
@@ -32,40 +32,17 @@ |
# |
define adblockplus::user ( |
$authorized_keys = [], |
- $ensure = 'present', |
$groups = [], |
$password_hash = undef, |
) { |
include adblockplus |
+ include users |
- # Re-used multiple times below |
- $home = "/home/$name" |
- |
- user {$name: |
- ensure => $ensure, |
+ users::user {"adblockplus::user#$name": |
+ authorized_keys => join($authorized_keys, "\n"), |
groups => $groups, |
- home => $home, |
- managehome => true, |
password => $password_hash, |
- shell => '/bin/bash', |
- } |
- |
- file {"$home/.ssh": |
- ensure => $ensure ? { |
- 'present' => 'directory', |
- default => $ensure, |
- }, |
- mode => 0700, |
- owner => $name, |
- require => User[$name], |
- } |
- |
- file {"$home/.ssh/authorized_keys": |
- content => join($authorized_keys, "\n"), |
- ensure => $ensure, |
- mode => 0644, |
- owner => $name, |
- require => File["$home/.ssh"], |
+ user_name => $name, |
} |
} |