sous-chefs / users

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

[COOK-4404] Determine file system and allow not managing NFS home directories #42

Closed iroller closed 10 years ago

iroller commented 10 years ago

Keeping default behaviour by managing all home dirs by default not to break anything. Not fully covered with tests since I was unable to find a way of stubbing `` or system() output with chefspec.

Please note that it should be merged only after my previous pull request since it uses testing environment configured by it: https://github.com/opscode-cookbooks/users/pull/40

avleen commented 10 years ago

This merge has left the master branch in a broken state.

When trying to add users, the user resource seems to not create the account. usermod never runs.

Eg, on Ubuntu 12.04:

Recipe: users::sysadmins
  * users_manage[sysadmin] action create[2014-03-11T19:47:31-07:00] FATAL: Cannot determine filesystem type for "/home/avleen"
Recipe: <Dynamically Defined Resource>
  * ruby_block[bailing-out] action create

Because the account isn't created, running stat against a non-existant directory fails.

sethvargo commented 10 years ago

@avleen don't work off master... That's why we have releases on the community site.

iroller commented 10 years ago

This should fix the problem: https://github.com/sethvargo-cookbooks/users/pull/48