Skip to content

Commit

Permalink
Merge pull request #140 from bastelfreak/rel420
Browse files Browse the repository at this point in the history
Release 4.2.0
  • Loading branch information
bastelfreak authored Jul 10, 2024
2 parents 0c30746 + fa61e5e commit 69dd56d
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 51 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file.
Each new release typically also includes the latest modulesync defaults.
These should not affect the functionality of the module.

## [v4.2.0](https://github.com/voxpupuli/puppet-cron/tree/v4.2.0) (2024-07-10)

[Full Changelog](https://github.com/voxpupuli/puppet-cron/compare/v4.1.0...v4.2.0)

**Implemented enhancements:**

- Add support for FreeBSD 14 [\#136](https://github.com/voxpupuli/puppet-cron/pull/136) ([smortex](https://github.com/smortex))
- Add parameters for file/directory modes [\#134](https://github.com/voxpupuli/puppet-cron/pull/134) ([ludovicus3](https://github.com/ludovicus3))

**Merged pull requests:**

- refactor: define job template as epp instead of erb [\#138](https://github.com/voxpupuli/puppet-cron/pull/138) ([bastelfreak](https://github.com/bastelfreak))
- Remove legacy top-scope syntax [\#125](https://github.com/voxpupuli/puppet-cron/pull/125) ([smortex](https://github.com/smortex))

## [v4.1.0](https://github.com/voxpupuli/puppet-cron/tree/v4.1.0) (2023-08-08)

[Full Changelog](https://github.com/voxpupuli/puppet-cron/compare/v4.0.0...v4.1.0)
Expand Down
1 change: 0 additions & 1 deletion REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,6 @@ Array[Struct[{
Optional['month'] => Cron::Month,
Optional['weekday'] => Cron::Weekday,
Optional['special'] => Cron::Special,
Optional['environment'] => Cron::Environment,
Optional['user'] => Cron::User,
Optional['description'] => String,
}]]
Expand Down
7 changes: 5 additions & 2 deletions manifests/job/multiple.pp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
Optional['month'] => Cron::Month,
Optional['weekday'] => Cron::Weekday,
Optional['special'] => Cron::Special,
Optional['environment'] => Cron::Environment,
Optional['user'] => Cron::User,
Optional['description'] => String,
}]] $jobs,
Expand All @@ -57,7 +56,11 @@
group => 'root',
mode => $mode,
path => "/etc/cron.d/${title}",
content => template('cron/multiple.erb'),
content => epp('cron/multiple.epp', {
name => $name,
environment => $environment,
jobs => $jobs,
}),
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{

Check warning on line 1 in metadata.json

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Skipping EOL operating system RedHat 7

Check warning on line 1 in metadata.json

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Skipping EOL operating system CentOS 7

Check warning on line 1 in metadata.json

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Skipping EOL operating system CentOS 8

Check warning on line 1 in metadata.json

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Skipping EOL operating system Debian 10

Check warning on line 1 in metadata.json

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Skipping EOL operating system FreeBSD 12
"name": "puppet-cron",
"version": "4.1.1-rc0",
"version": "4.2.0",
"author": "Vox Pupuli",
"summary": "Module to manage cron jobs via /etc/cron.d/",
"license": "Apache-2.0",
Expand Down
31 changes: 31 additions & 0 deletions templates/multiple.epp
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
################################################################################
# This file is managed by Puppet, and is refreshed regularly. #
# Edit at your own peril! #
################################################################################
## <%= $name %> Cron Job

# Environment Settings
<% $environment.each |$env_var| { -%>
<%= $env_var %>
<% } -%>

<%- $jobs.each |$job| { -%>
<%- if ! $job['command'] { -%>
<%- fail("Must pass command to Cron::Jobs") -%>
<%- } -%>
<%- $minute = $job['minute'] ? { undef => '*', default => $job['minute'] } -%>
<%- $hour = $job['hour'] ? { undef => '*', default => $job['hour'] } -%>
<%- $date = $job['date'] ? { undef => '*', default => $job['date'] } -%>
<%- $month = $job['month'] ? { undef => '*', default => $job['month'] } -%>
<%- $weekday = $job['weekday'] ? { undef => '*', default => $job['weekday'] } -%>
<%- $user = $job['user'] ? { undef => 'root', default => $job['user'] } -%>
<% if $job['description'] {-%>

# <%= $job['description'] %>
<% } -%>
<%- if $job['special'] { -%>
@<%= $job['special'] %> <%= $user %> <%= $job['command'] %>
<% } else { -%>
<%= $minute %> <%= $hour %> <%= $date %> <%= $month %> <%= $weekday %> <%= $user %> <%= $job['command'] %>
<% } -%>
<% } -%>
47 changes: 0 additions & 47 deletions templates/multiple.erb

This file was deleted.

0 comments on commit 69dd56d

Please sign in to comment.