Skip to content

Commit 3d73e7f

Browse files
author
Ashley Penney
committed
Merge pull request puppetlabs#372 from jhoblitt/feature/pg_hba.conf-ownership
change pg_hba.conf to be owned by postgres user account
2 parents a29d038 + d499390 commit 3d73e7f

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

manifests/server/config.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
if ($manage_pg_hba_conf == true) {
2020
# Prepare the main pg_hba file
2121
concat { $pg_hba_conf_path:
22-
owner => 0,
22+
owner => $user,
2323
group => $group,
2424
mode => '0640',
2525
warn => true,

spec/acceptance/server_spec.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ class { 'postgresql::server': }
1919
it { should be_listening }
2020
end
2121

22+
describe file('/var/lib/pgsql/data/pg_hba.conf') do
23+
it { should be_file }
24+
it { should be_owned_by 'postgres' }
25+
it { should be_grouped_into 'postgres' }
26+
it { should be_mode 640 }
27+
end
28+
2229
describe 'setting postgres password' do
2330
it 'should install and successfully adjust the password' do
2431
pp = <<-EOS.unindent

0 commit comments

Comments
 (0)