Showing with 36 additions and 25 deletions.
  1. +9 −0 CHANGELOG.md
  2. +16 −14 REFERENCE.md
  3. +1 −1 manifests/daily.pp
  4. +1 −1 manifests/hourly.pp
  5. +1 −1 manifests/init.pp
  6. +4 −2 manifests/job.pp
  7. +1 −1 manifests/job/multiple.pp
  8. +1 −1 manifests/monthly.pp
  9. +1 −1 manifests/weekly.pp
  10. +1 −1 metadata.json
  11. +0 −2 types/mode.pp
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ 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.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)

**Implemented enhancements:**

- cron::job: make file group configureable [\#121](https://github.com/voxpupuli/puppet-cron/pull/121) ([bastelfreak](https://github.com/bastelfreak))
- Replace Cron::Mode type with Stdlib::Filemode [\#120](https://github.com/voxpupuli/puppet-cron/pull/120) ([bastelfreak](https://github.com/bastelfreak))

## [v4.0.0](https://github.com/voxpupuli/puppet-cron/tree/v4.0.0) (2023-07-31)

[Full Changelog](https://github.com/voxpupuli/puppet-cron/compare/v3.0.0...v4.0.0)
Expand Down
30 changes: 16 additions & 14 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
* [`Cron::Job_ensure`](#Cron--Job_ensure): Valid $ensure parameter to Cron::Job.
* [`Cron::Jobname`](#Cron--Jobname): Valid $title parameter to Cron::Job. This is the name of the /etc/cron.d/ file. The Ubuntu run-parts manpage specifies (^[a-zA-Z0-9_-]+$). Fo
* [`Cron::Minute`](#Cron--Minute): Valid $minute parameter to Cron::Job.
* [`Cron::Mode`](#Cron--Mode): Valid $mode parameter to Cron::Job.
* [`Cron::Month`](#Cron--Month): Valid $month parameter to Cron::Job.
* [`Cron::Monthname`](#Cron--Monthname): Short-names for each month.
* [`Cron::Package_ensure`](#Cron--Package_ensure): Valid $service_ensure parameter to Cron.
Expand Down Expand Up @@ -167,7 +166,7 @@ Default value: `false`

##### <a name="-cron--allow_deny_mode"></a>`allow_deny_mode`

Data type: `Cron::Mode`
Data type: `Stdlib::Filemode`

Specify the cron.allow/deny file mode.

Expand Down Expand Up @@ -327,7 +326,7 @@ Default value: `'root'`

##### <a name="-cron--daily--mode"></a>`mode`

Data type: `Cron::Mode`
Data type: `Stdlib::Filemode`

The mode to set on the created job file.

Expand Down Expand Up @@ -411,7 +410,7 @@ Default value: `'root'`

##### <a name="-cron--hourly--mode"></a>`mode`

Data type: `Cron::Mode`
Data type: `Stdlib::Filemode`

The mode to set on the created job file.

Expand Down Expand Up @@ -455,6 +454,7 @@ The following parameters are available in the `cron::job` defined type:
* [`special`](#-cron--job--special)
* [`environment`](#-cron--job--environment)
* [`user`](#-cron--job--user)
* [`group`](#-cron--job--group)
* [`mode`](#-cron--job--mode)
* [`description`](#-cron--job--description)

Expand Down Expand Up @@ -538,9 +538,17 @@ The user the cron job should be executed as.

Default value: `'root'`

##### <a name="-cron--job--group"></a>`group`

Data type: `Variant[String[1],Integer[0]]`

the group the cron job file should by owned by.

Default value: `0`

##### <a name="-cron--job--mode"></a>`mode`

Data type: `Cron::Mode`
Data type: `Stdlib::Filemode`

The mode to set on the created job file.

Expand Down Expand Up @@ -634,7 +642,7 @@ Default value: `[]`

##### <a name="-cron--job--multiple--mode"></a>`mode`

Data type: `Cron::Mode`
Data type: `Stdlib::Filemode`

The mode to set on the created job file.

Expand Down Expand Up @@ -730,7 +738,7 @@ Default value: `'root'`

##### <a name="-cron--monthly--mode"></a>`mode`

Data type: `Cron::Mode`
Data type: `Stdlib::Filemode`

The mode to set on the created job file.

Expand Down Expand Up @@ -826,7 +834,7 @@ Default value: `'root'`

##### <a name="-cron--weekly--mode"></a>`mode`

Data type: `Cron::Mode`
Data type: `Stdlib::Filemode`

The mode to set on the created job file.

Expand Down Expand Up @@ -928,12 +936,6 @@ Variant[Integer[0,59], Pattern[/(?x)\A(
)\z/]]
```

### <a name="Cron--Mode"></a>`Cron::Mode`

Valid $mode parameter to Cron::Job.

Alias of `Pattern[/\A[0-7]{4}\z/]`

### <a name="Cron--Month"></a>`Cron::Month`

Valid $month parameter to Cron::Job.
Expand Down
2 changes: 1 addition & 1 deletion manifests/daily.pp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
Cron::Hour $hour = 0,
Cron::Environment $environment = [],
Cron::User $user = 'root',
Cron::Mode $mode = '0600',
Stdlib::Filemode $mode = '0600',
Optional[String] $description = undef,
) {
cron::job { $title:
Expand Down
2 changes: 1 addition & 1 deletion manifests/hourly.pp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
Cron::Minute $minute = 0,
Cron::Environment $environment = [],
Cron::User $user = 'root',
Cron::Mode $mode = '0600',
Stdlib::Filemode $mode = '0600',
Optional[String] $description = undef,
) {
cron::job { $title:
Expand Down
2 changes: 1 addition & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
Array[Cron::User] $users_deny = [],
Boolean $manage_users_allow = false,
Boolean $manage_users_deny = false,
Cron::Mode $allow_deny_mode = '0644',
Stdlib::Filemode $allow_deny_mode = '0644',
Enum['deep', 'first', 'hash', 'unique'] $merge = 'hash',
Boolean $manage_crontab = false,
Stdlib::Absolutepath $crontab_shell = '/bin/bash',
Expand Down
6 changes: 4 additions & 2 deletions manifests/job.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
# @param special A crontab specific keyword like 'reboot'.
# @param environment An array of environment variable settings.
# @param user The user the cron job should be executed as.
# @param group the group the cron job file should by owned by.
# @param mode The mode to set on the created job file.
# @param description Optional short description, which will be included in the cron job file.
#
Expand All @@ -29,7 +30,8 @@
Cron::Special $special = undef,
Cron::Environment $environment = [],
Cron::User $user = 'root',
Cron::Mode $mode = '0600',
Variant[String[1],Integer[0]] $group = 0,
Stdlib::Filemode $mode = '0600',
Optional[String] $description = undef,
) {
assert_type(Cron::Jobname, $title)
Expand All @@ -45,7 +47,7 @@
file { "job_${title}":
ensure => 'file',
owner => 'root',
group => 0,
group => $group,
mode => $mode,
path => "/etc/cron.d/${title}",
content => template('cron/job.erb'),
Expand Down
2 changes: 1 addition & 1 deletion manifests/job/multiple.pp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
}]] $jobs,
Cron::Job_ensure $ensure = 'present',
Cron::Environment $environment = [],
Cron::Mode $mode = '0600',
Stdlib::Filemode $mode = '0600',
) {
case $ensure {
'absent': {
Expand Down
2 changes: 1 addition & 1 deletion manifests/monthly.pp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
Cron::Date $date = 1,
Cron::Environment $environment = [],
Cron::User $user = 'root',
Cron::Mode $mode = '0600',
Stdlib::Filemode $mode = '0600',
Optional[String] $description = undef,
) {
cron::job { $title:
Expand Down
2 changes: 1 addition & 1 deletion manifests/weekly.pp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
Cron::Hour $hour = 0,
Cron::Weekday $weekday = 0,
Cron::User $user = 'root',
Cron::Mode $mode = '0600',
Stdlib::Filemode $mode = '0600',
Cron::Environment $environment = [],
Optional[String] $description = undef,
) {
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "puppet-cron",
"version": "4.0.0",
"version": "4.1.0",
"author": "Vox Pupuli",
"summary": "Module to manage cron jobs via /etc/cron.d/",
"license": "Apache-2.0",
Expand Down
2 changes: 0 additions & 2 deletions types/mode.pp

This file was deleted.