Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added option to delete the cron.deny file when $manage_users_deny is true. #146

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ The following parameters are available in the `cron` class:
* [`crontab_run_parts`](#-cron--crontab_run_parts)
* [`file_mode`](#-cron--file_mode)
* [`dir_mode`](#-cron--dir_mode)
* [`cron_users_deny_ensure`](#-cron--cron_users_deny_ensure)
* [`package_ensure`](#-cron--package_ensure)

##### <a name="-cron--service_name"></a>`service_name`
Expand Down Expand Up @@ -246,6 +247,14 @@ The file mode for the cron directories

Default value: `'0755'`

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

Data type: `Enum['file', 'absent']`

The state of the cron.deny file when $manage_users_deny is true.

Default value: `'file'`

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

Data type: `Cron::Package_ensure`
Expand Down
4 changes: 3 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
# @param crontab_run_parts Define sadditional cron::run_parts resources
# @param file_mode The file mode for the system crontab file
# @param dir_mode The file mode for the cron directories
# @param cron_users_deny_ensure The state of the cron.deny file when $manage_users_deny is true.
#
# @example simply include the module
# include cron
Expand Down Expand Up @@ -49,6 +50,7 @@
Cron::Run_parts $crontab_run_parts = {},
Stdlib::Filemode $file_mode = '0644',
Stdlib::Filemode $dir_mode = '0755',
Enum['file', 'absent'] $cron_users_deny_ensure = 'file',
) {
contain 'cron::install'
contain 'cron::service'
Expand All @@ -68,7 +70,7 @@

if $manage_users_deny {
file { '/etc/cron.deny':
ensure => file,
ensure => $cron_users_deny_ensure,
mode => $allow_deny_mode,
owner => 'root',
group => 0,
Expand Down
Loading