File tree Expand file tree Collapse file tree 3 files changed +21
-2
lines changed
Expand file tree Collapse file tree 3 files changed +21
-2
lines changed Original file line number Diff line number Diff line change 101101
102102 # RedHat-based systems hardcode some PG* variables in the init script, and need to be overriden
103103 # in /etc/sysconfig/pgsql/postgresql. Create a blank file so we can manage it with augeas later.
104- if ($::osfamily == ' RedHat' ) and ($::operatingsystemrelease !~ /^7/) {
104+ if ($::osfamily == ' RedHat' ) and ($::operatingsystemrelease !~ /^7/) and ( $::operatingsystem != ' Fedora ' ) {
105105 file { '/etc/sysconfig/pgsql/postgresql' :
106106 ensure => present ,
107107 replace => false ,
Original file line number Diff line number Diff line change 3030 # have to create a systemd override for the port or update the sysconfig
3131 # file.
3232 if $::osfamily == ' RedHat' {
33- if $::operatingsystemrelease =~ /^7/ {
33+ if $::operatingsystemrelease =~ /^7/ or $::operatingsystem == ' Fedora ' {
3434 if $name == ' port' {
3535 file { 'systemd-port-override' :
3636 ensure => present ,
Original file line number Diff line number Diff line change 6262 end
6363 let ( :params ) { { :ensure => 'present' , :name => 'port' , :value => '5432' } }
6464
65+ it 'stops postgresql and changes the port' do
66+ is_expected . to contain_file ( 'systemd-port-override' )
67+ is_expected . to contain_exec ( 'restart-systemd' )
68+ end
69+ end
70+ context 'fedora 19' do
71+ let :facts do
72+ {
73+ :osfamily => 'RedHat' ,
74+ :operatingsystem => 'Fedora' ,
75+ :operatingsystemrelease => '19' ,
76+ :kernel => 'Linux' ,
77+ :concat_basedir => tmpfilename ( 'contrib' ) ,
78+ :id => 'root' ,
79+ :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' ,
80+ }
81+ end
82+ let ( :params ) { { :ensure => 'present' , :name => 'port' , :value => '5432' } }
83+
6584 it 'stops postgresql and changes the port' do
6685 is_expected . to contain_file ( 'systemd-port-override' )
6786 is_expected . to contain_exec ( 'restart-systemd' )
You can’t perform that action at this time.
0 commit comments