From 5e87fbb9b9818e9889e1dcacc450d645e2109573 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?=
 <hugo.hornquist@liuformulastudent.se>
Date: Wed, 12 Aug 2020 20:45:51 +0000
Subject: [PATCH] Gave up on gecos.

---
 functions/gecos.pp                    | 21 ---------------------
 modules/baseinstall/manifests/init.pp |  6 +-----
 2 files changed, 1 insertion(+), 26 deletions(-)
 delete mode 100644 functions/gecos.pp

diff --git a/functions/gecos.pp b/functions/gecos.pp
deleted file mode 100644
index d1bf598..0000000
--- a/functions/gecos.pp
+++ /dev/null
@@ -1,21 +0,0 @@
-# Handle GECOS (passwd comment field)
-# https://en.wikipedia.org/wiki/Gecos_field
-function gecos(
-  Hash[String,String,0,5] $hash = {}
-) {
-  $default_hash = {
-    'name'   => '',
-    'room'   => '',
-    'phone1' => '',
-    'phone2' => '',
-    'mail'   => '',
-  }
-  $rh = $default_host + $hash
-  join([
-    $rh['name'],
-    $rh['room'],
-    $rh['phone1'],
-    $rh['phone2'],
-    $rh['mail'],
-  ], ',')
-}
diff --git a/modules/baseinstall/manifests/init.pp b/modules/baseinstall/manifests/init.pp
index 8164bf7..b3bcb75 100644
--- a/modules/baseinstall/manifests/init.pp
+++ b/modules/baseinstall/manifests/init.pp
@@ -41,11 +41,7 @@ class baseinstall {
 
   user { 'lysroot':
     ensure     => 'present',
-    comment    => gecos({
-      name => 'Lysator admin account',
-      room => '~',
-      mail => 'root@lysator.liu.se',
-    }),
+    comment    => 'Lysator admin account,~,,,root@lysator.liu.se',
     membership => 'minimum',
     groups     => [
       'sudo',
-- 
GitLab