/[adm]/puppet/modules/buildsystem/lib/puppet/parser/functions/group_members.rb
ViewVC logotype

Contents of /puppet/modules/buildsystem/lib/puppet/parser/functions/group_members.rb

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2423 - (show annotations) (download)
Fri Feb 17 16:43:42 2012 UTC (13 years, 2 months ago) by misc
File size: 266 byte(s)
add a function to get the members list of a unix group, idea from boklm
1 require 'etc'
2 # group_members($group)
3 # -> return a array with the login of the group members
4
5 module Puppet::Parser::Functions
6 newfunction(:group_members, :type => :rvalue) do |args|
7 group = args[0]
8 return Etc.getgrnam(group).mem
9 end
10 end

  ViewVC Help
Powered by ViewVC 1.1.30