-
-
Notifications
You must be signed in to change notification settings - Fork 92
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
Fix Issue 70 add file mode parameters #109
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,27 @@ | ||
# | ||
class logrotate ( | ||
String $ensure = present, | ||
Boolean $hieramerge = false, | ||
Boolean $manage_cron_daily = true, | ||
Boolean $create_base_rules = true, | ||
Boolean $purge_configdir = false, | ||
String $package = 'logrotate', | ||
Hash $rules = {}, | ||
Optional[Hash] $config = undef, | ||
Integer[0,23] $cron_daily_hour = $logrotate::params::cron_daily_hour, | ||
Integer[0,59] $cron_daily_minute = $logrotate::params::cron_daily_minute, | ||
Integer[0,59] $cron_hourly_minute = $logrotate::params::cron_hourly_minute, | ||
String $cron_hourly_file = $logrotate::params::cron_hourly_file, | ||
String $configdir = $logrotate::params::configdir, | ||
String $logrotate_bin = $logrotate::params::logrotate_bin, | ||
String $logrotate_conf = $logrotate::params::logrotate_conf, | ||
Boolean $manage_package = $logrotate::params::manage_package, | ||
String $rules_configdir = $logrotate::params::rules_configdir, | ||
String $root_user = $logrotate::params::root_user, | ||
String $root_group = $logrotate::params::root_group, | ||
String $ensure = present, | ||
Boolean $hieramerge = false, | ||
Boolean $manage_cron_daily = true, | ||
Boolean $create_base_rules = true, | ||
Boolean $purge_configdir = false, | ||
String $package = 'logrotate', | ||
Hash $rules = {}, | ||
Optional[Hash] $config = undef, | ||
Integer[0,23] $cron_daily_hour = $logrotate::params::cron_daily_hour, | ||
Integer[0,59] $cron_daily_minute = $logrotate::params::cron_daily_minute, | ||
Integer[0,59] $cron_hourly_minute = $logrotate::params::cron_hourly_minute, | ||
String $cron_hourly_file = $logrotate::params::cron_hourly_file, | ||
Stdlib::Filemode $cron_file_mode = $logrotate::params::cron_file_mode, | ||
String $configdir = $logrotate::params::configdir, | ||
String $logrotate_bin = $logrotate::params::logrotate_bin, | ||
String $logrotate_conf = $logrotate::params::logrotate_conf, | ||
Stdlib::Filemode $logrotate_conf_mode = $logrotate::params::logrotate_conf_mode, | ||
Boolean $manage_package = $logrotate::params::manage_package, | ||
String $rules_configdir = $logrotate::params::rules_configdir, | ||
Stdlib::Filemode $rules_configdir_mode = $logrotate::params::rules_configdir_mode, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is why I dislike lining up equals (and why I jokingly asked if we could just change to module level hieradata :) |
||
String $root_user = $logrotate::params::root_user, | ||
String $root_group = $logrotate::params::root_group, | ||
) inherits logrotate::params { | ||
|
||
contain ::logrotate::install | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
"dependencies": [ | ||
{ | ||
"name": "puppetlabs/stdlib", | ||
"version_requirement": ">= 4.13.1 <5.0.0" | ||
"version_requirement": ">= 4.22.0 < 5.0.0" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This appears to be the version of stdlib where they added Stdlib::Filemode |
||
} | ||
], | ||
"requirements": [ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You probably knew this already but be aware that
Stdlib::Filemode
does not support all of the variants ofFile mode =>
. For instance,a+rwx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, it currently looks like:
Pattern[/^[0124]{1}[0-7]{3}$/]
... which matches the permissions that are set in params.I think the right thing to do would be to improve Stdlib::Filemode, if someone wants to use symbolic file modes. If the folks here feel strongly that we need to support it before that time, we could just make the type
String[3]
or whatever. I don't feel like we should make our own FileMode to support it.