diff --git a/CHANGELOG b/CHANGELOG index 2aa6055..6d49bd5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,5 @@ * Thu Jul 12 2018 Trey Dockendorf - 6.1.3-0 +- Add `aide::cron_command` to allow user modification. - Ensure that the package is explicitly installed before any dependent resources. diff --git a/manifests/init.pp b/manifests/init.pp index a93ab5d..28b6b28 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -47,18 +47,21 @@ # @param minute # ``minute`` cron parameter for when the AIDE check is run # -# @param hour +# @param hour # ``hour`` cron parameter for when the AIDE check is run # -# @param monthday +# @param monthday # ``monthday`` cron parameter for when the AIDE check is run # -# @param month +# @param month # ``month`` cron parameter for when the AIDE check is run # # @param weekday # ``weekday`` cron parameter for when the AIDE check is run # +# @param cron_command +# ``command`` cron parameter for when AIDE check is run +# # @param default_rules # A set of default rules to include. If this is set, the internal # defaults will be overridden. @@ -106,6 +109,7 @@ Variant[Enum['*'],Stdlib::Compat::Integer] $monthday = '*', Variant[Enum['*'],Stdlib::Compat::Integer] $month = '*', Stdlib::Compat::Integer $weekday = 0, + String $cron_command = '/bin/nice -n 19 /usr/sbin/aide -C', String $default_rules = '', # lint:ignore:empty_string_assignment Boolean $logrotate = simplib::lookup('simp_options::logrotate', { 'default_value' => false}), Aide::Rotateperiod $rotate_period = 'weekly', diff --git a/manifests/set_schedule.pp b/manifests/set_schedule.pp index f8b26f4..f9879d7 100644 --- a/manifests/set_schedule.pp +++ b/manifests/set_schedule.pp @@ -7,6 +7,7 @@ # @param monthday ``monthday`` cron parameter # @param month ``month`` cron parameter # @param weekday ``weekday`` cron parameter +# @param command ``command`` cron parameter # # @author https://github.com/simp/pupmod-simp-aide/graphs/contributors # @@ -15,7 +16,8 @@ Stdlib::Compat::Integer $hour = $::aide::hour, Variant[Enum['*'],Stdlib::Compat::Integer] $monthday = $::aide::monthday, Variant[Enum['*'],Stdlib::Compat::Integer] $month = $::aide::month, - Stdlib::Compat::Integer $weekday = $::aide::weekday + Stdlib::Compat::Integer $weekday = $::aide::weekday, + String $command = $::aide::cron_command, ) { assert_private() @@ -24,7 +26,7 @@ validate_between($weekday, 0, 7) cron { 'aide_schedule': - command => '/bin/nice -n 19 /usr/sbin/aide -C', + command => $command, user => 'root', minute => $minute, hour => $hour,