Merge pull request #463 from apenney/fix-selinux
This seems to fix up selinux for tablespace.
This commit is contained in:
commit
14558900f6
3 changed files with 7 additions and 14 deletions
|
@ -25,10 +25,13 @@ define postgresql::server::tablespace(
|
||||||
$create_tablespace_command = "CREATE TABLESPACE \"${spcname}\" ${owner_section} LOCATION '${location}'"
|
$create_tablespace_command = "CREATE TABLESPACE \"${spcname}\" ${owner_section} LOCATION '${location}'"
|
||||||
|
|
||||||
file { $location:
|
file { $location:
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
owner => $user,
|
owner => $user,
|
||||||
group => $group,
|
group => $group,
|
||||||
mode => '0700',
|
mode => '0700',
|
||||||
|
seluser => 'system_u',
|
||||||
|
selrole => 'object_r',
|
||||||
|
seltype => 'postgresql_db_t',
|
||||||
}
|
}
|
||||||
|
|
||||||
$create_ts = "Create tablespace '${spcname}'"
|
$create_ts = "Create tablespace '${spcname}'"
|
||||||
|
|
|
@ -1,11 +1,6 @@
|
||||||
require 'spec_helper_acceptance'
|
require 'spec_helper_acceptance'
|
||||||
|
|
||||||
describe 'postgresql::server::schema:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
|
describe 'postgresql::server::schema:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
|
||||||
after :all do
|
|
||||||
# Cleanup after tests have ran
|
|
||||||
apply_manifest("class { 'postgresql::server': ensure => absent }", :catch_failures => true)
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'should create a schema for a user' do
|
it 'should create a schema for a user' do
|
||||||
begin
|
begin
|
||||||
pp = <<-EOS.unindent
|
pp = <<-EOS.unindent
|
||||||
|
|
|
@ -96,11 +96,6 @@ RSpec.configure do |c|
|
||||||
on host, '/usr/sbin/update-locale'
|
on host, '/usr/sbin/update-locale'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
if fact('osfamily') == 'RedHat'
|
|
||||||
shell('yum -y install policycoreutils-python')
|
|
||||||
shell('semanage port -a -t postgresql_port_t -p tcp 5433')
|
|
||||||
end
|
|
||||||
on host, puppet('module','install','puppetlabs-stdlib'), { :acceptable_exit_codes => [0,1] }
|
on host, puppet('module','install','puppetlabs-stdlib'), { :acceptable_exit_codes => [0,1] }
|
||||||
on host, puppet('module','install','puppetlabs-firewall'), { :acceptable_exit_codes => [0,1] }
|
on host, puppet('module','install','puppetlabs-firewall'), { :acceptable_exit_codes => [0,1] }
|
||||||
on host, puppet('module','install','puppetlabs-apt'), { :acceptable_exit_codes => [0,1] }
|
on host, puppet('module','install','puppetlabs-apt'), { :acceptable_exit_codes => [0,1] }
|
||||||
|
|
Loading…
Reference in a new issue