Puppet Function: add_all_users
- Defined in:
- modules/admin/lib/puppet/parser/functions/add_all_users.rb
- Function type:
- Ruby 3.x API
Overview
2 3 4 5 6 7 8 9 10 |
# File 'modules/admin/lib/puppet/parser/functions/add_all_users.rb', line 2 newfunction(:add_all_users, :type => :rvalue) do |args| myhash = args[0] users = [] myhash['users'].each do |name, data| users.push name if data['ensure'] == 'present' && !data.fetch('system', false) end myhash['groups']['all-users']['members'] = users return myhash end |