Add admin users for puppet and svn
authorroot <root@puppet.intra.cacert.org>
Fri, 4 Nov 2016 23:39:41 +0000 (00:39 +0100)
committerroot <root@puppet.intra.cacert.org>
Fri, 4 Nov 2016 23:39:41 +0000 (00:39 +0100)
hieradata/common.yaml
hieradata/nodes/puppet.infra.cacert.org.yaml
hieradata/nodes/svn.infra.cacert.org.yaml
modules/profiles/manifests/base.pp

index 22159a8..b2e666c 100644 (file)
@@ -1,6 +1,12 @@
 ---
 users:
-  -
+  jandd:
     username: jandd
-    password: ENC[PKCS7,MIIBiQYJKoZIhvcNAQcDoIIBejCCAXYCAQAxggEhMIIBHQIBADAFMAACAQEwDQYJKoZIhvcNAQEBBQAEggEAbf2hB1CWpWQykHg8SIu1yZVH6aCkPD8E/mMkvcbOW+OsERwTOqvea8TIK0XrzEvcGCBhYt7Angmvu/BIZXgFnotDEYpAbhledqbjkH/yFkYcY1lQrE1q3AvUrpZ9CFof8imhmzqSj7OZZUDQpMEXbXAesBhzXBdpziPSHtcW4LxJoXG3OpFybyiGMVbFVc+y/CzQSqabQPx/JSlDEceSZJLts4mmRqn4/PIbDURbs3mRH74pvVwsNlLGq/CC7/nQ+dA+4c597+/mhxCay0Q+oE5EOrvurdK9er1zw5zJPOadJwuJFXgZ+M0PJEi+WA34skrGzvUByk8URlcLc1nFKTBMBgkqhkiG9w0BBwEwHQYJYIZIAWUDBAEqBBA0xSzloY3MrzzZtPYIkDyHgCBY0cx39nZdsVb0JmljrI9m2tJAkW3mTxyw69Ju7ctPUQ==]
+    fullname: Jan Dittberner
     uid: 1000
+    password: ENC[PKCS7,MIIB2gYJKoZIhvcNAQcDoIIByzCCAccCAQAxggEhMIIBHQIBADAFMAACAQEwDQYJKoZIhvcNAQEBBQAEggEAYmmeAt8w5DMzcB2T84r/s2mikksh1kxVFEG5Nk0o/jOh0BSdtKnEZLYV1SRa2Gvgu6ACqLAqYD+4c9neAnYcQrYL5y9rXC+l61bid3L83wM2XkBJYt534ZlU8XqjEB7R7wyQu+u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PUQcyUuO58/PyDmVqv+P8RH2rDMSJCSzSRMBFVXg==]
index af5d8b9..760c36b 100644 (file)
@@ -1,3 +1,6 @@
 ---
 classes:
   - roles::svnserver
+admins:
+  - jandd
+  - law
index cede5d2..044fbdd 100644 (file)
@@ -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'],
+    }
+  }
 }