Skip to content

Commit

Permalink
Add Array of Integers as valid type for run_minute
Browse files Browse the repository at this point in the history
  • Loading branch information
danifr committed Apr 23, 2022
1 parent 99105b9 commit b32c4ef
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions manifests/agent/service/cron.pp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Set up running the agent via cron
# @api private
class puppet::agent::service::cron (
Boolean $enabled = false,
Optional[Integer[0,23]] $hour = undef,
Optional[Integer[0,59]] $minute = undef,
Boolean $enabled = false,
Optional[Integer[0,23]] $hour = undef,
Variant[Integer[0,59], Array[Integer[0,59]], Undef] $minute = undef,
) {
unless $puppet::runmode == 'unmanaged' or 'cron' in $puppet::unavailable_runmodes {
if $enabled {
Expand Down
6 changes: 3 additions & 3 deletions manifests/agent/service/systemd.pp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Set up running the agent via a systemd timer
# @api private
class puppet::agent::service::systemd (
Boolean $enabled = false,
Optional[Integer[0,23]] $hour = undef,
Optional[Integer[0,59]] $minute = undef,
Boolean $enabled = false,
Optional[Integer[0,23]] $hour = undef,
Variant[Integer[0,59], Array[Integer[0,59]], Undef] $minute = undef,
) {
unless $puppet::runmode == 'unmanaged' or 'systemd.timer' in $puppet::unavailable_runmodes {
# Use the same times as for cron
Expand Down
2 changes: 1 addition & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@
Boolean $usecacheonfailure = $puppet::params::usecacheonfailure,
Enum['cron', 'service', 'systemd.timer', 'none', 'unmanaged'] $runmode = $puppet::params::runmode,
Optional[Integer[0,23]] $run_hour = undef,
Optional[Integer[0,59]] $run_minute = undef,
Variant[Integer[0,59], Array[Integer[0,59], Undef]] $run_minute = undef,
Array[Enum['cron', 'service', 'systemd.timer', 'none']] $unavailable_runmodes = $puppet::params::unavailable_runmodes,
Optional[String] $cron_cmd = $puppet::params::cron_cmd,
Optional[String] $systemd_cmd = $puppet::params::systemd_cmd,
Expand Down

0 comments on commit b32c4ef

Please sign in to comment.