mirror of
https://github.com/genebean/dots.git
synced 2026-03-27 09:27:44 -04:00
Created fuction to parse username from $homedir
$homedir is pulled from Hiera
This commit is contained in:
parent
4591546207
commit
4b75708af5
1 changed files with 10 additions and 0 deletions
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue