]> git.openstreetmap.org Git - chef.git/blob - cookbooks/chef/libraries/cpu.rb
nominatim: ruby packages needed for prometheus
[chef.git] / cookbooks / chef / libraries / cpu.rb
1 module OpenStreetMap
2   module Mixin
3     module CPU
4       def cpu_cores
5         [dig("cpu", "total").to_i, dig("cpu", "cores").to_i, 4].max
6       end
7     end
8   end
9 end
10
11 Chef::Node.include(OpenStreetMap::Mixin::CPU)