X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/261e7e9cd1a9882faa4ed7087b5902ebafe25988..ecb5d5beac1e41d30e47daa6a034c59b33027d12:/cookbooks/postgresql/recipes/default.rb diff --git a/cookbooks/postgresql/recipes/default.rb b/cookbooks/postgresql/recipes/default.rb index 9dfde2448..ea043096c 100644 --- a/cookbooks/postgresql/recipes/default.rb +++ b/cookbooks/postgresql/recipes/default.rb @@ -20,7 +20,7 @@ package "postgresql-common" service "postgresql" do - action [ :enable, :start ] + action [:enable, :start] supports :status => true, :restart => true, :reload => true end @@ -98,7 +98,7 @@ package "libdbd-pg-perl" clusters = node[:postgresql][:clusters] || [] -clusters.each do |name,details| +clusters.each do |name, details| suffix = name.tr("/", ":") munin_plugin "postgres_bgwriter_#{suffix}" do @@ -131,11 +131,11 @@ clusters.each do |name,details| conf_variables :port => details[:port] end - if File.exist?("/var/lib/postgresql/#{details[:version]}/main/recovery.conf") - munin_plugin "postgres_replication_#{suffix}" do - target "postgres_replication" - conf "munin.erb" - conf_variables :port => details[:port] - end + next unless File.exist?("/var/lib/postgresql/#{details[:version]}/main/recovery.conf") + + munin_plugin "postgres_replication_#{suffix}" do + target "postgres_replication" + conf "munin.erb" + conf_variables :port => details[:port] end end