Skip to content

Commit

Permalink
fix missing Install section in timer
Browse files Browse the repository at this point in the history
fixes #40
  • Loading branch information
TheMeier committed Mar 3, 2024
1 parent 49fcc1b commit 0264db3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
9 changes: 6 additions & 3 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,18 @@
}) + $_service_overrides,
}
systemd::manage_unit { "${unit_name}_cron.timer":
ensure => $file_ensure,
unit_entry => delete_undef_values({
ensure => $file_ensure,
unit_entry => delete_undef_values({
'Description' => $timer_description ,
}) + $timer_unit_overrides,
timer_entry => delete_undef_values({
timer_entry => delete_undef_values({
'OnCalendar' => $on_calendar,
'OnBootSec' => $on_boot_sec,
'OnUnitActiveSec' => $on_unitactive_sec,
}) + $_timer_overrides,
install_entry => {
'WantedBy' => 'timers.target',
},
}
service { "${unit_name}_cron.timer":
Expand Down
1 change: 1 addition & 0 deletions spec/defines/init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
it {
is_expected.to contain_file("/etc/systemd/system/#{title}_cron.timer")
.with_content(%r{Description=timer for Print date cron})
.with_content(%r{WantedBy=timers.target})
}
it {
is_expected.to contain_file("/etc/systemd/system/#{title}_cron.timer")
Expand Down

0 comments on commit 0264db3

Please sign in to comment.