File tree 2 files changed +29
-0
lines changed
2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -856,6 +856,14 @@ Current it is only actively tested with the following operating systems:
856
856
857
857
Although patches are welcome for making it work with other OS distros, it is considered best effort.
858
858
859
+ ### All versions of RHEL/Centos
860
+
861
+ If you have selinux enabled you must add any custom ports you use to the postgresql_port_t context. You can do this as follows:
862
+
863
+ ```
864
+ # semanage port -a -t postgresql_port_t -p tcp $customport
865
+ ```
866
+
859
867
### RHEL7
860
868
861
869
Currently the following features are unsupported:
Original file line number Diff line number Diff line change @@ -253,6 +253,27 @@ class { "postgresql::server":
253
253
apply_manifest ( "class { 'postgresql::server': ensure => absent }" , :catch_failures => true )
254
254
end
255
255
256
+ it 'sets up selinux' do
257
+ pp = <<-EOS
258
+ if $::osfamily == 'RedHat' and $::selinux == 'true' {
259
+ $semanage_package = $::operatingsystemmajrelease ? {
260
+ '5' => 'policycoreutils',
261
+ default => 'policycoreutils-python',
262
+ }
263
+
264
+ package { $semanage_package: ensure => installed }
265
+ exec { 'set_postgres':
266
+ command => 'semanage port -a -t postgresql_port_t -p tcp 5433',
267
+ path => '/bin:/usr/bin/:/sbin:/usr/sbin',
268
+ subscribe => Package[$semanage_package],
269
+ refreshonly => true,
270
+ }
271
+ EOS
272
+
273
+ apply_manifest ( pp , :catch_failures => true )
274
+ end
275
+
276
+
256
277
context 'test installing postgresql with alternate port' do
257
278
it 'perform installation and make sure it is idempotent' do
258
279
pp = <<-EOS . unindent
You can’t perform that action at this time.
0 commit comments