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 101
101
102
102
# RedHat-based systems hardcode some PG* variables in the init script, and need to be overriden
103
103
# 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 ' ) {
105
105
file { '/etc/sysconfig/pgsql/postgresql' :
106
106
ensure => present ,
107
107
replace => false ,
Original file line number Diff line number Diff line change 30
30
# have to create a systemd override for the port or update the sysconfig
31
31
# file.
32
32
if $::osfamily == ' RedHat' {
33
- if $::operatingsystemrelease =~ /^7/ {
33
+ if $::operatingsystemrelease =~ /^7/ or $::operatingsystem == ' Fedora ' {
34
34
if $name == ' port' {
35
35
file { 'systemd-port-override' :
36
36
ensure => present ,
Original file line number Diff line number Diff line change 62
62
end
63
63
let ( :params ) { { :ensure => 'present' , :name => 'port' , :value => '5432' } }
64
64
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
+
65
84
it 'stops postgresql and changes the port' do
66
85
is_expected . to contain_file ( 'systemd-port-override' )
67
86
is_expected . to contain_exec ( 'restart-systemd' )
You can’t perform that action at this time.
0 commit comments