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

Add "idmap config" parameter #45

Merged
merged 1 commit into from
Feb 2, 2024

Conversation

bschonec
Copy link
Contributor

This pull request supersedes #37.

@bschonec bschonec force-pushed the merge_idmap_config branch 2 times, most recently from ab296c3 to 2b4998f Compare January 19, 2024 19:15
@@ -13,7 +13,7 @@

define samba::option (
String $key = $title,
Variant[Boolean, Integer, String, Array[String], Undef] $value = undef,
Variant[Hash, Boolean, Integer, String, Array[String], Undef] $value = undef,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the samba:option is not the right place to add a hash type. It will be very complex to pass it on to the augeas. I think this needs to be handled in a different way. I am not fully sure yet but it looks very similar to the this module handles the shares.

Copy link
Contributor Author

@bschonec bschonec Jan 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, I have been having trouble with Hash and augeas. I'll be working on the code more today and tomorrow; perhaps I can come up with a solution. The reason for the [new] hash here is to accommodate #37 which I have refactored.

Perhaps we could abandon augeas altogether? I've always thought of augeas as the last choice when managing configuration files. Yes, it would be significant effort in moving to template-based management of the smb.conf file but we'd have significantly more control over the creation and validation of the smb.conf parameters.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason I prefer augeas over templates is the constant upkeep required to align the template with upstream changes. It is just not worth the effort across many different platforms. This hash can be solved similar to how shares work. They are simply hash values as well.

@bschonec
Copy link
Contributor Author

After much stress and anguish I think that I've got the idmap_config parameter added along with tests. I worked off the back of @welchnut so I take credit for none of this. @rehanone, I will rebase the branch and resubmit if you're OK with the changes.

@rehanone
Copy link
Owner

This PR does look very promising! I think that looks to be the right approach without changing too many things. I could not spend too much time today to look at individual changes though I will try to do this in a few day. Thank you once again @bschonec for the heavy lift!

@rehanone
Copy link
Owner

@bschonec , please let me know if this PR is ready to be merged? I will create a release once this PR is complete.

@bschonec
Copy link
Contributor Author

Yes, it's ready.

@bschonec
Copy link
Contributor Author

bschonec commented Feb 2, 2024

@rehanone , when you merge this, I'll update the other requests that are pending.

@rehanone rehanone merged commit 1247b4e into rehanone:master Feb 2, 2024
4 checks passed
@bschonec bschonec deleted the merge_idmap_config branch February 5, 2024 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants