summaryrefslogtreecommitdiffstats
path: root/modules/base/functions
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2018-11-15 23:44:28 -0500
committerJesse Luehrs <doy@tozt.net>2018-11-15 23:44:28 -0500
commitb7fae4bde557809f0ea9bc6552e1932afd857d63 (patch)
tree2eb73bb2069cfaa55e04ca3354c32acc42e69cc5 /modules/base/functions
parent08318e4bb85b5e4afca1886c9c7482f02460f12f (diff)
downloadpuppet-tozt-b7fae4bde557809f0ea9bc6552e1932afd857d63.tar.gz
puppet-tozt-b7fae4bde557809f0ea9bc6552e1932afd857d63.zip
simplify home directory handling
Diffstat (limited to 'modules/base/functions')
-rw-r--r--modules/base/functions/home.pp6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/base/functions/home.pp b/modules/base/functions/home.pp
new file mode 100644
index 0000000..fd2f73e
--- /dev/null
+++ b/modules/base/functions/home.pp
@@ -0,0 +1,6 @@
+function base::home(String $user) >> String {
+ $user ? {
+ 'root' => '/root',
+ default => "/home/$user",
+ }
+}