Skip to content

Commit

Permalink
Correct timer_entry error message on a non-timer
Browse files Browse the repository at this point in the history
While

```puppet
systemd::manage_dropin{'custom.conf':
  ensure => present,
  unit   => 'my.service',
  timer_entry => {
   'Calendar' => 'Daily'
  },
}
```
was failing the error message gave incorrect information.
  • Loading branch information
traylenator committed Apr 22, 2023
1 parent 2953b7c commit 2288206
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion manifests/manage_dropin.pp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
Optional[Systemd::Unit::Path] $path_entry = undef,
) {
if $timer_entry and $unit !~ Pattern['^[^/]+\.timer'] {
fail("Systemd::Manage_unit[${name}]: timer_entry is only valid for timer units")
fail("Systemd::Manage_dropin[${name}]: for unit ${unit} timer_entry is only valid for timer units")
}

if $path_entry and $unit !~ Pattern['^[^/]+\.path'] {
Expand Down

0 comments on commit 2288206

Please sign in to comment.