|
224 | 224 | # - $datadir
|
225 | 225 | # - @extra_systemd_config
|
226 | 226 |
|
227 |
| - if (versioncmp($facts['puppetversion'], '6.1.0') < 0) { |
228 |
| - exec { 'restart-systemd': |
229 |
| - command => 'systemctl daemon-reload', |
230 |
| - refreshonly => true, |
231 |
| - path => '/bin:/usr/bin:/usr/local/bin', |
232 |
| - before => Class['postgresql::server::service'], |
233 |
| - } |
234 |
| - $systemd_notify = [Exec['restart-systemd'], Class['postgresql::server::service']] |
235 |
| - } |
236 |
| - else { |
237 |
| - $systemd_notify = Class['postgresql::server::service'] |
| 227 | + # While Puppet 6.1 and newer can do a daemon-reload if needed, systemd |
| 228 | + # doesn't appear to report that correctly. This is probably because its |
| 229 | + # unit file is actually removed. |
| 230 | + # |
| 231 | + # This can be removed when Puppet < 6.1 support is dropped *and* the file |
| 232 | + # old-systemd-override is removed. |
| 233 | + exec { 'restart-systemd': |
| 234 | + command => 'systemctl daemon-reload', |
| 235 | + refreshonly => true, |
| 236 | + path => '/bin:/usr/bin:/usr/local/bin', |
| 237 | + before => Class['postgresql::server::service'], |
238 | 238 | }
|
239 | 239 |
|
240 | 240 | file {
|
241 | 241 | default:
|
242 | 242 | ensure => file,
|
243 | 243 | owner => root,
|
244 | 244 | group => root,
|
245 |
| - notify => $systemd_notify, |
| 245 | + notify => [Exec['restart-systemd'], Class['postgresql::server::service']], |
246 | 246 | before => Class['postgresql::server::reload'],
|
247 | 247 |
|
248 | 248 | ;
|
|
0 commit comments