File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 2222 $datadir = $postgresql::server::datadir
2323 $logdir = $postgresql::server::logdir
2424 $service_name = $postgresql::server::service_name
25+ $service_enable = $postgresql::server::service_enable
2526 $log_line_prefix = $postgresql::server::log_line_prefix
2627 $timezone = $postgresql::server::timezone
2728 $password_encryption = $postgresql::server::password_encryption
256257 content => template (' postgresql/systemd-override.erb' ),
257258 require => File [' systemd-conf-dir' ],
258259 ;
260+ }
259261
262+ if $service_enable != ' mask' {
260263 # Remove old unit file to avoid conflicts
261- ' old-systemd-override' :
262- ensure => absent ,
263- path => " /etc/systemd/system/${service_name} .service" ,
264- ;
264+ file { 'old-systemd-override' :
265+ ensure => absent ,
266+ path => " /etc/systemd/system/${service_name} .service" ,
267+ notify => [Exec[' restart-systemd' ], Class[' postgresql::server::service' ]],
268+ before => Class[' postgresql::server::reload' ],
269+ }
265270 }
266271 }
267272}
You can’t perform that action at this time.
0 commit comments