Created fuction to parse username from $homedir

$homedir is pulled from Hiera
This commit is contained in:
Gene Liverman 2018-02-10 20:16:47 -08:00
parent 4591546207
commit 4b75708af5

View file

@ -0,0 +1,10 @@
Puppet::Functions.create_function(:homedir_to_user) do
dispatch :homedir_to_user do
param 'String', :some_path
return_type 'String'
end
def homedir_to_user(some_path)
some_path.split('/')[-1]
end
end