File tree Expand file tree Collapse file tree 3 files changed +28
-0
lines changed Expand file tree Collapse file tree 3 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 9797 postgresql::server::config_entry { 'listen_addresses' :
9898 value => $listen_addresses ,
9999 }
100+
101+ # When installing pgrpms packages, write a /etc/sysconfig/pgsql file
102+ if (($::osfamily == ' RedHat' or $::osfamily == ' Linux' ) and $postgresql::globals::manage_package_repo == true ) {
103+ $version_parts = split($version , ' [.]' )
104+ # File will be something like /etc/sysconfig/pgsql/postgresql-9.3
105+ file { "etc-sysconfig-pgsql" :
106+ path => " /etc/sysconfig/pgsql/postgresql-${version_parts[0]}.${version_parts[1]}" ,
107+ content => template (' postgrseql/etc-sysconfig-pgsql.erb' ),
108+ }
109+ }
100110 } else {
101111 file { $pg_hba_conf_path:
102112 ensure => absent ,
Original file line number Diff line number Diff line change 9090 should contain_exec ( 'postgresql_initdb' )
9191 end
9292 end
93+
94+ describe '/etc/sysconfig/pgsql on RHEL based systems' do
95+ let ( :params ) do
96+ {
97+ :manage_package_repo => true ,
98+ :operatingsystem => 'CentOS' ,
99+ :operatingsystemmajrelease => '6' ,
100+ :operatingsystemrelease => '6.5' ,
101+ :osfamily => 'RedHat' ,
102+ :version => '9.3.2-1' ,
103+ }
104+
105+ it 'should include the proper sysconfig file' do
106+ should contain_file ( '/etc/sysconfig/pgsql/postgresql-9.3' )
107+ end
108+ end
109+ end
93110end
Original file line number Diff line number Diff line change 1+ PGDATA=<%= @datadir %>
You can’t perform that action at this time.
0 commit comments