Skip to content

Commit a18d560

Browse files
author
Ashley Penney
committed
This seems to fix up selinux for tablespace.
1 parent 03a5159 commit a18d560

File tree

3 files changed

+7
-14
lines changed

3 files changed

+7
-14
lines changed

manifests/server/tablespace.pp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,13 @@
2525
$create_tablespace_command = "CREATE TABLESPACE \"${spcname}\" ${owner_section} LOCATION '${location}'"
2626

2727
file { $location:
28-
ensure => directory,
29-
owner => $user,
30-
group => $group,
31-
mode => '0700',
28+
ensure => directory,
29+
owner => $user,
30+
group => $group,
31+
mode => '0700',
32+
seluser => 'system_u',
33+
selrole => 'object_r',
34+
seltype => 'postgresql_db_t',
3235
}
3336

3437
$create_ts = "Create tablespace '${spcname}'"

spec/acceptance/server/schema_spec.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
require 'spec_helper_acceptance'
22

33
describe 'postgresql::server::schema:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
4-
after :all do
5-
# Cleanup after tests have ran
6-
apply_manifest("class { 'postgresql::server': ensure => absent }", :catch_failures => true)
7-
end
8-
94
it 'should create a schema for a user' do
105
begin
116
pp = <<-EOS.unindent

spec/spec_helper_acceptance.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,6 @@ def psql(psql_cmd, user = 'postgres', exit_codes = [0,1], &block)
9696
on host, '/usr/sbin/update-locale'
9797
end
9898

99-
100-
if fact('osfamily') == 'RedHat'
101-
shell('yum -y install policycoreutils-python')
102-
shell('semanage port -a -t postgresql_port_t -p tcp 5433')
103-
end
10499
on host, puppet('module','install','puppetlabs-stdlib'), { :acceptable_exit_codes => [0,1] }
105100
on host, puppet('module','install','puppetlabs-firewall'), { :acceptable_exit_codes => [0,1] }
106101
on host, puppet('module','install','puppetlabs-apt'), { :acceptable_exit_codes => [0,1] }

0 commit comments

Comments
 (0)