Permalink
Browse files

not setting the pgsql dir anymore, client recipes should create symlinks

  • Loading branch information...
1 parent 7f2d8e3 commit 6e9ad9e78a7266a09e94456161162fb20d7c31ee @phunehehe committed Jan 17, 2013
Showing with 6 additions and 6 deletions.
  1. +0 −3 postgresql/recipes/server91.rb
  2. +6 −3 postgresql/recipes/server_redhat91.rb
@@ -19,9 +19,6 @@
# limitations under the License.
#
-node.set[:postgresql][:dir] = '/var/lib/pgsql/9.1/data'
-
-
::Chef::Recipe.send(:include, Opscode::OpenSSL::Password)
include_recipe "yum::postgresql91"
@@ -64,11 +64,14 @@
package "postgresql-server"
end
+
+pgsql_dir = node[:postgresql][:dir]
+
execute "/sbin/service postgresql-9.1 initdb" do
- not_if { ::FileTest.exist?(File.join(node.postgresql.dir, "PG_VERSION")) }
+ not_if { ::FileTest.exist?(File.join(pgsql_dir, "PG_VERSION")) }
end
-template "#{node[:postgresql][:dir]}/postgresql.conf" do
+template "#{pgsql_dir}/postgresql.conf" do
source "redhat.postgresql.conf.erb"
owner "postgres"
group "postgres"
@@ -79,7 +82,7 @@
archive_dir = node.postgresql.config.archive_dir
if node.postgresql.is_slave
- template "#{node.postgresql.dir}/recovery.conf" do
+ template "#{pgsql_dir}/recovery.conf" do
source "recovery.conf.erb"
owner "postgres"
group "postgres"

0 comments on commit 6e9ad9e

Please sign in to comment.