File tree Expand file tree Collapse file tree 4 files changed +6
-43
lines changed Expand file tree Collapse file tree 4 files changed +6
-43
lines changed Original file line number Diff line number Diff line change 192192 },
193193 ' Debian' => $facts [' os' ][' name' ] ? {
194194 ' Debian' => $facts [' os' ][' release' ][' major' ] ? {
195- ' 6' => ' 8.4' ,
196- ' 7' => ' 9.1' ,
197195 ' 8' => ' 9.4' ,
198196 ' 9' => ' 9.6' ,
199197 ' 10' => ' 11' ,
200198 ' 11' => ' 13' ,
201199 default => undef ,
202200 },
203201 ' Ubuntu' => $facts [' os' ][' release' ][' major' ] ? {
204- /^(10.04|10.10|11.04)$/ => ' 8.4' ,
205- /^(11.10|12.04|12.10|13.04|13.10)$/ => ' 9.1' ,
206202 /^(14.04)$/ => ' 9.3' ,
207203 /^(14.10|15.04|15.10)$/ => ' 9.4' ,
208204 /^(16.04|16.10)$/ => ' 9.5' ,
Original file line number Diff line number Diff line change 9797 # a systemd override for the port or update the sysconfig file, but this
9898 # is managed for us in postgresql::server::config.
9999 if $facts [' os' ][' name' ] == ' Debian' or $facts [' os' ][' name' ] == ' Ubuntu' {
100- if $name == ' port' and $facts [' os' ][' release' ][' major' ] in [' 6' , ' 10.04' ] {
101- exec { "postgresql_stop_${name}" :
102- command => " service ${postgresql::server::service_name} stop" ,
103- onlyif => " service ${postgresql::server::service_name} status" ,
104- unless => " grep 'port = ${value} ' ${postgresql::server::postgresql_conf_path} " ,
105- path => ' /usr/sbin:/sbin:/bin:/usr/bin:/usr/local/bin' ,
106- before => Postgresql_conf[$name ],
107- }
108- }
109- elsif $name == ' data_directory' {
100+ if $name == ' data_directory' {
110101 exec { "postgresql_stop_${name}" :
111102 command => " service ${postgresql::server::service_name} stop" ,
112103 onlyif => " service ${postgresql::server::service_name} status" ,
Original file line number Diff line number Diff line change 146146 require => File [$require_before_initdb ],
147147 cwd => $module_workdir ,
148148 }
149- # The package will take care of this for us the first time, but if we
150- # ever need to init a new db we need to copy these files explicitly
151- if $facts [' os' ][' name' ] == ' Debian' or $facts [' os' ][' name' ] == ' Ubuntu' {
152- if $facts [' os' ][' release' ][' major' ] in [' 6' , ' 7' , ' 10.04' , ' 12.04' ] {
153- file { 'server.crt' :
154- ensure => file ,
155- path => " ${datadir} /server.crt" ,
156- source => ' file:///etc/ssl/certs/ssl-cert-snakeoil.pem' ,
157- owner => $postgresql::server::user ,
158- group => $postgresql::server::group ,
159- mode => ' 0644' ,
160- require => Exec[' postgresql_initdb' ],
161- }
162- file { 'server.key' :
163- ensure => file ,
164- path => " ${datadir} /server.key" ,
165- source => ' file:///etc/ssl/private/ssl-cert-snakeoil.key' ,
166- owner => $postgresql::server::user ,
167- group => $postgresql::server::group ,
168- mode => ' 0600' ,
169- require => Exec[' postgresql_initdb' ],
170- }
171- }
172- }
173149 } elsif $encoding != undef {
174150 # [workaround]
175151 # by default pg_createcluster encoding derived from locale
Original file line number Diff line number Diff line change 132132 os : {
133133 family : 'Debian' ,
134134 name : 'Debian' ,
135- release : { 'full' => '6 .0' , 'major' => '6 ' } ,
135+ release : { 'full' => '10 .0' , 'major' => '10 ' } ,
136136 } ,
137137 kernel : 'Linux' ,
138138 id : 'root' ,
148148 }
149149 end
150150
151- it { is_expected . to contain_file ( '/var/lib/postgresql/8.4 /main' ) } # FIXME: be more precise
152- it { is_expected . to contain_concat ( '/etc/postgresql/8.4 /main/pg_hba.conf' ) } # FIXME: be more precise
153- it { is_expected . to contain_concat ( '/etc/postgresql/8.4 /main/pg_ident.conf' ) } # FIXME: be more precise
151+ it { is_expected . to contain_file ( '/var/lib/postgresql/11 /main' ) } # FIXME: be more precise
152+ it { is_expected . to contain_concat ( '/etc/postgresql/11 /main/pg_hba.conf' ) } # FIXME: be more precise
153+ it { is_expected . to contain_concat ( '/etc/postgresql/11 /main/pg_ident.conf' ) } # FIXME: be more precise
154154
155155 context 'with mandatory arguments only' do
156156 it {
166166 os : {
167167 family : 'Debian' ,
168168 name : 'Debian' ,
169- release : { 'full' => '6 .0' , 'major' => '6 ' } ,
169+ release : { 'full' => '10 .0' , 'major' => '10 ' } ,
170170 } ,
171171 kernel : 'Linux' ,
172172 id : 'root' ,
You can’t perform that action at this time.
0 commit comments