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

Fix Issue 70 add file mode parameters #109

Merged
merged 1 commit into from
Apr 4, 2018

Conversation

TJM
Copy link

@TJM TJM commented Apr 2, 2018

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

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,
Copy link
Author

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"
Copy link
Author

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,
Copy link
Member

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

Copy link
Author

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.

@juniorsysadmin juniorsysadmin added bug Something isn't working enhancement New feature or request and removed bug Something isn't working labels Apr 4, 2018
@juniorsysadmin juniorsysadmin merged commit 9345931 into voxpupuli:master Apr 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants