]> git.openstreetmap.org Git - chef.git/commitdiff
Fix some cookstyle warnings
authorTom Hughes <tom@compton.nu>
Sun, 4 Dec 2022 18:58:51 +0000 (18:58 +0000)
committerTom Hughes <tom@compton.nu>
Sun, 4 Dec 2022 18:58:51 +0000 (18:58 +0000)
cookbooks/chef/libraries/cpu.rb
cookbooks/chef/libraries/edit_file.rb
cookbooks/chef/libraries/persistent_token.rb
cookbooks/prometheus/recipes/default.rb

index a7992a4ca374bcb6e65d21220697ef5deab8d8de..1e2d8447f413ef8269d25b952b603d032e0984ec 100644 (file)
@@ -2,7 +2,7 @@ module OpenStreetMap
   module Mixin
     module CPU
       def cpu_cores
-        [self.dig("cpu", "total").to_i, self.dig("cpu", "cores").to_i, 4].max
+        [dig("cpu", "total").to_i, dig("cpu", "cores").to_i, 4].max
       end
     end
   end
index f7c23178c3928a166886990206990b4de33ad6d6..7de56267f3628b62f639ce6afdc1d6b267accb0a 100644 (file)
@@ -12,4 +12,4 @@ module OpenStreetMap
   end
 end
 
-Chef::Recipe.include(OpenStreetMap::Mixin::EditFile)
+Chef::DSL::Recipe.include(OpenStreetMap::Mixin::EditFile)
index e6f87350754514a0bb564b4eb1632d1f6dad9fff..944f19363e8e8e4db618c46245768440ab5cf7b9 100644 (file)
@@ -15,4 +15,4 @@ module OpenStreetMap
   end
 end
 
-Chef::Recipe.include(OpenStreetMap::Mixin::PersistentToken)
+Chef::DSL::Recipe.include(OpenStreetMap::Mixin::PersistentToken)
index 7b281b03cb4dd07985aa7a28a95572584ae1ac02..0806061e6c594c565e373636d73c56ade1e0cf99 100644 (file)
@@ -102,7 +102,7 @@ prometheus_exporter "node" do
   user "root"
   proc_subset "all"
   protect_clock false
-  restrict_address_families ["AF_UNIX", "AF_NETLINK"]
+  restrict_address_families %w[AF_UNIX AF_NETLINK]
   system_call_filter ["@system-service", "@clock"]
   options %w[
     --collector.textfile.directory=/var/lib/prometheus/node-exporter