summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorroot <root@puppet.intra.cacert.org>2016-11-05 00:39:41 +0100
committerroot <root@puppet.intra.cacert.org>2016-11-05 00:39:41 +0100
commit1dad9bcf5c2f3212052ce493b08b1a2af754b7f1 (patch)
treeae36f3f6a9d4071c58d01f1be106b3f622e063b6 /modules
parent2feedef1756f775d23f9a59a5c2461187bb1cfec (diff)
downloadcacert-puppet-1dad9bcf5c2f3212052ce493b08b1a2af754b7f1.tar.gz
cacert-puppet-1dad9bcf5c2f3212052ce493b08b1a2af754b7f1.tar.xz
cacert-puppet-1dad9bcf5c2f3212052ce493b08b1a2af754b7f1.zip
Add admin users for puppet and svn
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'],
+ }
+ }
}