Closed frank-m closed 3 years ago
@frank-m are you intending on completely removing support of databags or only making it optional?
Make it optional. You can still pass the content of a data bag as the users property, but in the recipe instead of the the resource. I will provide an upgrading.md with details and make sure there is tests for that.
So, I updated the unit and integration tests and made sure that both data bag and non data bag usage is tested. I also updated the readme and added upgrading.md.
Can someone do a first review? After that I will remove the WIP: and squash the commits.
@ramereth @bmhughes I just ran into something while implementing the users cookbook that I want to add as a feature.
It allows you to specify if a user needs to have a group with its own name or not.
Do you think I can add it to this pull request so we can release it into 6.0.0, or do you want me to open a separate one later?
No it can go into this as it's a major release anyway
@bmhughes did you also see the new functionality I added?
The username_group
stuff? Yes I did, the branch could do with a good squash/rebase/reword when you're finished as it's a little hard to follow what's been done in what commit.
Also, you're probably going to hate me for this, but looking at this as a whole from the outside (I don't personally use this cookbook) I'd consider refactorting it to operate on a single user per resource and leave the multiple-user stuff to the wrapping cookbook. If you did this all the stuff around variables types and checks go away as you aren't dependant on an arbitrary hash being passed in that you hope has the correct types and values in it. As it stands this is a recipe implemented as a resource, I might be missing the point by not being a user of the cookbook though.
I thought about that, but that would be a massive breaking change I reckon.
No problem to do that, but not sure if the users of the users cookbook would still want to use it then :)
I thought about that, but that would be a massive breaking change I reckon.
No problem to do that, but not sure if the users of the users cookbook would still want to use it then :)
Yeah kind of the point of this cookbook is being able to manage a group of users easily. I don't think it'd be a good idea to make that change.
I think I have addressed everything. Can you approve if you agree?
Released as: 6.0.0
Description
This pull request removes the hard depedency on data bags from the manage resource. As such the user can choose if they want to use attributes/data bags or a different solution of their preference.
Check List