Skip to content

Commit

Permalink
Remove platform specific template generation. Add generic config temp…
Browse files Browse the repository at this point in the history
…late
  • Loading branch information
chrisroberts authored and jtimberman committed Nov 9, 2012
1 parent 3efc1a1 commit 1e26521
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 17 deletions.
10 changes: 9 additions & 1 deletion recipes/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,15 @@
include_recipe "postgresql::server_debian"
end

template "#{node['postgresql']['dir']}/pg_hba.conf" do
template "#{node[:postgresql][:dir]}/postgresql.conf" do
source "postgresql.conf.erb"
owner "postgres"
group "postgres"
mode 0600
notifies :restart, resources(:service => "postgresql"), :immediately
end

template "#{node[:postgresql][:dir]}/pg_hba.conf" do
source "pg_hba.conf.erb"
owner "postgres"
group "postgres"
Expand Down
8 changes: 0 additions & 8 deletions recipes/server_debian.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,3 @@
supports :restart => true, :status => true, :reload => true
action [:enable, :start]
end

template "#{node['postgresql']['dir']}/postgresql.conf" do
source "debian.postgresql.conf.erb"
owner "postgres"
group "postgres"
mode 0600
notifies :restart, resources(:service => "postgresql"), :immediately
end
8 changes: 0 additions & 8 deletions recipes/server_redhat.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,3 @@
supports :restart => true, :status => true, :reload => true
action [:enable, :start]
end

template "#{node['postgresql']['dir']}/postgresql.conf" do
source "redhat.postgresql.conf.erb"
owner "postgres"
group "postgres"
mode 0600
notifies :restart, resources(:service => "postgresql"), :immediately
end

0 comments on commit 1e26521

Please sign in to comment.