mirror of
https://github.com/genebean/dots.git
synced 2026-03-28 01:47:42 -04:00
Moved custom facts and functions into one module
This commit is contained in:
parent
c8d218fee8
commit
cc631cb462
3 changed files with 0 additions and 0 deletions
|
|
@ -0,0 +1,10 @@
|
|||
Puppet::Functions.create_function(:find_group) do
|
||||
dispatch :find_group do
|
||||
param 'String', :some_path
|
||||
return_type 'String'
|
||||
end
|
||||
|
||||
def find_group(some_path)
|
||||
File.stat(some_path).gid.to_s
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
Puppet::Functions.create_function(:find_owner) do
|
||||
dispatch :find_owner do
|
||||
param 'String', :some_path
|
||||
return_type 'String'
|
||||
end
|
||||
|
||||
def find_owner(some_path)
|
||||
File.stat(some_path).uid.to_s
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue