Moved custom facts and functions into one module

This commit is contained in:
Gene Liverman 2017-10-15 17:37:43 -07:00
parent c8d218fee8
commit cc631cb462
3 changed files with 0 additions and 0 deletions

View file

@ -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

View file

@ -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