in chef/cookbooks/cpe_ulimit/resources/cpe_ulimit.rb [59:88]
def max_processes
soft_limit = node['cpe_ulimit']['maxproc_soft_limit']
hard_limit = node['cpe_ulimit']['maxproc_hard_limit']
if soft_limit.nil? || hard_limit.nil?
Chef::Log.warn('cpe_ulimit maxproc soft/hard limits not configured. ' \
'Skipping install')
else
max_proc_hash = {
'Label' => node['cpe_launchd']['prefix'] + '.maxproc',
'ProgramArguments' => [
'/bin/launchctl',
'limit',
'maxproc',
soft_limit,
hard_limit,
],
'RunAtLoad' => true,
'ServiceIPC' => false,
}
node.default['cpe_launchd']['maxproc'] = {
'plist_hash' => max_proc_hash,
'type' => 'daemon',
}
end
end