voxpupuli / puppet-systemd

Puppet module to manage systemd
https://forge.puppet.com/puppet/systemd
Apache License 2.0
52 stars 142 forks source link

Avoid empty sections being created in unit files #431

Closed traylenator closed 4 months ago

traylenator commented 4 months ago

Pull Request (PR) description

Before this patch:

systemd::manage_unut{'myserive.service':
  ensure => 'present',
  service_entry => {},
  install_entry => {},
}

would create a unit file:

[Service]

[Install]

Insist that at least one directive is present per defined section if ensure => present.

In particular systemd::timer_wrapper was creating empty sections often.