-
-
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
Conversation
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 comment
The 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 :)
@@ -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 comment
The 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
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, |
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 of File 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.
Pull Request (PR) description
Add parameters for file modes instead of hardcoding them. Default to "Red Hat" RPM permissions (for now).
This Pull Request (PR) fixes the following issues
Fixes Issue #70