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 22
22
$datadir = $postgresql::server::datadir
23
23
$logdir = $postgresql::server::logdir
24
24
$service_name = $postgresql::server::service_name
25
+ $service_enable = $postgresql::server::service_enable
25
26
$log_line_prefix = $postgresql::server::log_line_prefix
26
27
$timezone = $postgresql::server::timezone
27
28
$password_encryption = $postgresql::server::password_encryption
256
257
content => template (' postgresql/systemd-override.erb' ),
257
258
require => File [' systemd-conf-dir' ],
258
259
;
260
+ }
259
261
262
+ if $service_enable != ' mask' {
260
263
# 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
+ }
265
270
}
266
271
}
267
272
}
You can’t perform that action at this time.
0 commit comments