sous-chefs / users

Development repository for the users cookbook
https://supermarket.chef.io/cookbooks/users
Apache License 2.0
138 stars 218 forks source link

set manage_home to false #403

Closed Raboo closed 6 years ago

Raboo commented 7 years ago

Is there a way to have manage_home set to false? I don't want created users to get a copy of /etc/skel

iennae commented 7 years ago

Right now, the recipe as is does not parse a manage_home attribute within the databag. It does look to see if the home directory is set which if set to "/dev/null" will set manage_home to false. This probably isn't sufficient for your needs, but let us know.

Raboo commented 7 years ago

I also noticed that I need to create the user home directory when manage_home is set to false. But I've tried different ways to get+set users primary group as owner for the users home folder. But it always fails cause the resource is evaluated at the start of the chef run before the user is created.

Does anyway have a smart way to exclude some resources from being evaluated before they actually are executed?

Raboo commented 7 years ago

So I added a PR, can someone help with the whole gid ownership thing?

iennae commented 7 years ago

When manage_home is set to false it means that you don't want chef to set up the directory as per the user resource documentation.

It sounds like you are looking for lazy evaluation of attributes .

Raboo commented 7 years ago

Yes, that worked, will update the PR

Raboo commented 7 years ago

Ok, Lazy Evaluation added and README fixed. PR updated.

Raboo commented 7 years ago

Ok I feel I'm done with the "code" part. But some tests are failing, but I'll write about that in the PR.

Raboo commented 6 years ago

closing this issue as because it's become stale.