Skip to content

Commit

Permalink
Added option to delete the cron.deny file when is true.
Browse files Browse the repository at this point in the history
  • Loading branch information
bschonec committed Aug 26, 2024
1 parent a9a0d41 commit 3db9615
Showing 1 changed file with 3 additions and 1 deletion.
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 @@ -58,7 +60,7 @@
# Manage cron.allow and cron.deny
if $manage_users_allow {
file { '/etc/cron.allow':
ensure => file,
ensure => $cron_users_deny_ensure
mode => $allow_deny_mode,
owner => 'root',
group => 0,
Expand Down

0 comments on commit 3db9615

Please sign in to comment.