From 7e5e5ba26f4a5b06fad5d1a1049df947e8a9cf00 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 26 Aug 2021 12:21:33 +0100 Subject: [PATCH] Fix new cookstyle warnings --- cookbooks/blog/recipes/default.rb | 2 +- cookbooks/civicrm/recipes/default.rb | 2 +- cookbooks/dev/recipes/default.rb | 6 +++--- cookbooks/docker/recipes/default.rb | 2 +- cookbooks/hardware/recipes/default.rb | 4 ++-- cookbooks/letsencrypt/recipes/default.rb | 2 +- cookbooks/networking/recipes/default.rb | 2 +- cookbooks/planet/recipes/current.rb | 2 +- cookbooks/stateofthemap/recipes/default.rb | 6 +++--- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/cookbooks/blog/recipes/default.rb b/cookbooks/blog/recipes/default.rb index 1f292eeb1..e746b1006 100644 --- a/cookbooks/blog/recipes/default.rb +++ b/cookbooks/blog/recipes/default.rb @@ -66,7 +66,7 @@ wordpress_plugin "blog.openstreetmap.org-sitepress-multilingual-cms" do plugin "sitepress-multilingual-cms" site "blog.openstreetmap.org" repository "https://git.openstreetmap.org/private/sitepress-multilingual-cms.git" - not_if { ENV["TEST_KITCHEN"] } + not_if { kitchen? } end wordpress_plugin "blog.openstreetmap.org-wordpress-importer" do diff --git a/cookbooks/civicrm/recipes/default.rb b/cookbooks/civicrm/recipes/default.rb index a8881fc0d..ced22c5f4 100644 --- a/cookbooks/civicrm/recipes/default.rb +++ b/cookbooks/civicrm/recipes/default.rb @@ -64,7 +64,7 @@ end wordpress_plugin "sitepress-multilingual-cms" do site "join.osmfoundation.org" repository "https://git.openstreetmap.org/private/sitepress-multilingual-cms.git" - not_if { ENV["TEST_KITCHEN"] } + not_if { kitchen? } end wordpress_plugin "contact-form-7" do diff --git a/cookbooks/dev/recipes/default.rb b/cookbooks/dev/recipes/default.rb index 15e9e7bbf..e0366f69e 100644 --- a/cookbooks/dev/recipes/default.rb +++ b/cookbooks/dev/recipes/default.rb @@ -352,7 +352,7 @@ if node[:postgresql][:clusters][:"13/main"] cwd cgimap_directory user "apis" group "apis" - subscribes :run, "git[#{cgimap_directory}]", :immediate + subscribes :run, "git[#{cgimap_directory}]", :immediately end execute "#{cgimap_directory}/configure" do @@ -361,7 +361,7 @@ if node[:postgresql][:clusters][:"13/main"] cwd cgimap_directory user "apis" group "apis" - subscribes :run, "execute[#{cgimap_directory}/autogen.sh]", :immediate + subscribes :run, "execute[#{cgimap_directory}/autogen.sh]", :immediately end execute "#{cgimap_directory}/Makefile" do @@ -370,7 +370,7 @@ if node[:postgresql][:clusters][:"13/main"] cwd cgimap_directory user "apis" group "apis" - subscribes :run, "execute[#{cgimap_directory}/configure]", :immediate + subscribes :run, "execute[#{cgimap_directory}/configure]", :immediately notifies :restart, "service[cgimap@#{name}]" end diff --git a/cookbooks/docker/recipes/default.rb b/cookbooks/docker/recipes/default.rb index 23891f110..80fd15b3f 100644 --- a/cookbooks/docker/recipes/default.rb +++ b/cookbooks/docker/recipes/default.rb @@ -41,5 +41,5 @@ end service "docker" do action [:enable, :start] subscribes :restart, "template[/etc/docker/daemon.json]" - not_if { ENV["TEST_KITCHEN"] } + not_if { kitchen? } end diff --git a/cookbooks/hardware/recipes/default.rb b/cookbooks/hardware/recipes/default.rb index 957121785..14e416d1d 100644 --- a/cookbooks/hardware/recipes/default.rb +++ b/cookbooks/hardware/recipes/default.rb @@ -141,7 +141,7 @@ if File.exist?("/etc/default/grub") execute "update-grub" do action :nothing command "/usr/sbin/update-grub" - not_if { ENV["TEST_KITCHEN"] } + not_if { kitchen? } end template "/etc/default/grub" do @@ -274,7 +274,7 @@ if tools_packages.include?("areca") depth 1 user "root" group "root" - not_if { ENV["TEST_KITCHEN"] } + not_if { kitchen? } end else directory "/opt/areca" do diff --git a/cookbooks/letsencrypt/recipes/default.rb b/cookbooks/letsencrypt/recipes/default.rb index c41732cf6..a327119bf 100644 --- a/cookbooks/letsencrypt/recipes/default.rb +++ b/cookbooks/letsencrypt/recipes/default.rb @@ -148,7 +148,7 @@ certificates.each do |name, details| user "letsencrypt" group "letsencrypt" subscribes :run, "template[/srv/acme.openstreetmap.org/requests/#{name}]" - not_if { ENV["TEST_KITCHEN"] } + not_if { kitchen? } end end diff --git a/cookbooks/networking/recipes/default.rb b/cookbooks/networking/recipes/default.rb index c76d47e3e..7bbf31505 100644 --- a/cookbooks/networking/recipes/default.rb +++ b/cookbooks/networking/recipes/default.rb @@ -321,7 +321,7 @@ template "/etc/hosts" do owner "root" group "root" mode "644" - not_if { ENV["TEST_KITCHEN"] } + not_if { kitchen? } end service "systemd-resolved" do diff --git a/cookbooks/planet/recipes/current.rb b/cookbooks/planet/recipes/current.rb index 9f951df53..c7175e6e1 100644 --- a/cookbooks/planet/recipes/current.rb +++ b/cookbooks/planet/recipes/current.rb @@ -49,7 +49,7 @@ remote_file "/var/lib/planet/planet.osh.pbf" do owner "planet" group "planet" mode "644" - not_if { ENV["TEST_KITCHEN"] } + not_if { kitchen? } end cron_d "planet-update" do diff --git a/cookbooks/stateofthemap/recipes/default.rb b/cookbooks/stateofthemap/recipes/default.rb index b2a40d1e7..34766a11a 100644 --- a/cookbooks/stateofthemap/recipes/default.rb +++ b/cookbooks/stateofthemap/recipes/default.rb @@ -173,7 +173,7 @@ wordpress_plugin "2010.stateofthemap.org-sitepress-multilingual-cms" do plugin "sitepress-multilingual-cms" site "2010.stateofthemap.org" repository "https://git.openstreetmap.org/private/sitepress-multilingual-cms.git" - not_if { ENV["TEST_KITCHEN"] } + not_if { kitchen? } end wordpress_plugin "2010.stateofthemap.org-wp-sticky" do @@ -217,7 +217,7 @@ wordpress_plugin "2011.stateofthemap.org-sitepress-multilingual-cms" do plugin "sitepress-multilingual-cms" site "2011.stateofthemap.org" repository "https://git.openstreetmap.org/private/sitepress-multilingual-cms.git" - not_if { ENV["TEST_KITCHEN"] } + not_if { kitchen? } end wordpress_plugin "2011.stateofthemap.org-wp-sticky" do @@ -266,7 +266,7 @@ wordpress_plugin "2012.stateofthemap.org-sitepress-multilingual-cms" do plugin "sitepress-multilingual-cms" site "2012.stateofthemap.org" repository "https://git.openstreetmap.org/private/sitepress-multilingual-cms.git" - not_if { ENV["TEST_KITCHEN"] } + not_if { kitchen? } end wordpress_plugin "2012.stateofthemap.org-wp-sticky" do -- 2.43.2