summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/profiles/manifests/base.pp18
1 files changed, 16 insertions, 2 deletions
diff --git a/modules/profiles/manifests/base.pp b/modules/profiles/manifests/base.pp
index cede5d2..044fbdd 100644
--- a/modules/profiles/manifests/base.pp
+++ b/modules/profiles/manifests/base.pp
@@ -1,7 +1,21 @@
class profiles::base (
) {
# ensure admin users for this container
- $admins = hiera('users')
+ $admins = hiera('admins')
- notice { $admins: }
+ $admins.each |String $username| {
+ notice("Admin user ${username}")
+ $user = hiera('users')[$username]
+ group { $user['username']:
+ ensure => present,
+ } ->
+ user { $user['username']:
+ ensure => present,
+ comment => $user['fullname'],
+ gid => $user['username'],
+ groups => ['sudo', 'adm'],
+ password => $user['password'],
+ uid => $user['uid'],
+ }
+ }
}