From: Tom Hughes Date: Fri, 22 Nov 2013 22:49:01 +0000 (+0000) Subject: Fix some correctness issues identified by foodcritic X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/6728ed67e4d7dfb29fe546edc21d629fc4ac348c Fix some correctness issues identified by foodcritic --- diff --git a/cookbooks/dns/metadata.rb b/cookbooks/dns/metadata.rb index d2b4f54db..41820d87f 100644 --- a/cookbooks/dns/metadata.rb +++ b/cookbooks/dns/metadata.rb @@ -4,3 +4,5 @@ license "Apache 2.0" description "Configure DNS management" long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc')) version "1.0.0" +depends "git" +depends "apache" diff --git a/cookbooks/hardware/metadata.rb b/cookbooks/hardware/metadata.rb index 813604617..013c60425 100644 --- a/cookbooks/hardware/metadata.rb +++ b/cookbooks/hardware/metadata.rb @@ -4,3 +4,4 @@ license "Apache 2.0" description "Configures hardware" long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc')) version "1.0.0" +depends "git" diff --git a/cookbooks/munin/metadata.rb b/cookbooks/munin/metadata.rb index d132b5ba7..0a25ccb79 100644 --- a/cookbooks/munin/metadata.rb +++ b/cookbooks/munin/metadata.rb @@ -4,4 +4,5 @@ license "Apache 2.0" description "Installs and configures munin" long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc')) version "1.0.0" +depends "apache" depends "networking" diff --git a/cookbooks/networking/recipes/default.rb b/cookbooks/networking/recipes/default.rb index 29ea9ad65..9e87e2855 100644 --- a/cookbooks/networking/recipes/default.rb +++ b/cookbooks/networking/recipes/default.rb @@ -185,7 +185,7 @@ template "/etc/shorewall/rules" do owner "root" group "root" mode 0644 - variables :family => "inet", :rules => [] + variables :rules => [] notifies :restart, resources(:service => "shorewall") end @@ -290,7 +290,7 @@ if not node.interfaces(:family => :inet6).empty? owner "root" group "root" mode 0644 - variables :family => "inet6", :rules => [] + variables :rules => [] notifies :restart, resources(:service => "shorewall6") end diff --git a/cookbooks/openssh/recipes/default.rb b/cookbooks/openssh/recipes/default.rb index 79a2dd1fb..432da265f 100644 --- a/cookbooks/openssh/recipes/default.rb +++ b/cookbooks/openssh/recipes/default.rb @@ -48,7 +48,9 @@ end.collect do |node| } if node[:keys][:ssh][:host_ecdsa_public] - keys[node[:keys][:ssh][:host_ecdsa_type]] = node[:keys][:ssh][:host_ecdsa_public] + ecdsa_type = node[:keys][:ssh][:host_ecdsa_type] + + keys[ecdsa_type] = node[:keys][:ssh][:host_ecdsa_public] end Hash[ diff --git a/cookbooks/osqa/metadata.rb b/cookbooks/osqa/metadata.rb index da3014e8c..980b84b08 100644 --- a/cookbooks/osqa/metadata.rb +++ b/cookbooks/osqa/metadata.rb @@ -6,6 +6,7 @@ long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc')) version "1.0.0" depends "apache" depends "memcached" +depends "tools" attribute "osqa", :display_name => "OSQA", diff --git a/cookbooks/otrs/metadata.rb b/cookbooks/otrs/metadata.rb index 562783630..b8781adc9 100644 --- a/cookbooks/otrs/metadata.rb +++ b/cookbooks/otrs/metadata.rb @@ -6,6 +6,7 @@ long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc')) version "1.0.0" depends "apache" depends "postgresql" +depends "tools" attribute "otrs", :display_name => "OTRS", diff --git a/cookbooks/otrs/recipes/default.rb b/cookbooks/otrs/recipes/default.rb index c0f9c33e7..901c0eedd 100644 --- a/cookbooks/otrs/recipes/default.rb +++ b/cookbooks/otrs/recipes/default.rb @@ -18,6 +18,7 @@ # include_recipe "tools" +include_recipe "postgresql" include_recipe "apache::ssl" passwords = data_bag_item("otrs", "passwords") diff --git a/cookbooks/stats/recipes/default.rb b/cookbooks/stats/recipes/default.rb index b1420734d..aec51357c 100644 --- a/cookbooks/stats/recipes/default.rb +++ b/cookbooks/stats/recipes/default.rb @@ -63,7 +63,7 @@ template "/srv/stats.openstreetmap.org/index.html" do source "index.html.erb" owner "root" group "root" - mode 644 + mode 0644 variables :sites => node[:stats][:sites] end