From: Tom Hughes Date: Wed, 18 Nov 2015 14:03:43 +0000 (+0000) Subject: Wait until postgres is configured before starting it X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/46b6613ef2c4c03cbd708d86bf395adc7f06d004 Wait until postgres is configured before starting it Fixes #42 --- diff --git a/cookbooks/postgresql/recipes/default.rb b/cookbooks/postgresql/recipes/default.rb index ea043096c..a0d9f0e90 100644 --- a/cookbooks/postgresql/recipes/default.rb +++ b/cookbooks/postgresql/recipes/default.rb @@ -19,11 +19,6 @@ package "postgresql-common" -service "postgresql" do - action [:enable, :start] - supports :status => true, :restart => true, :reload => true -end - node[:postgresql][:versions].each do |version| package "postgresql-#{version}" package "postgresql-client-#{version}" @@ -89,6 +84,11 @@ node[:postgresql][:versions].each do |version| end end +service "postgresql" do + action [:enable, :start] + supports :status => true, :restart => true, :reload => true +end + ohai_plugin "postgresql" do template "ohai.rb.erb" end