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

Setting inclusive membership on users is not possible #78

Open
sigv opened this issue Mar 26, 2017 · 2 comments
Open

Setting inclusive membership on users is not possible #78

sigv opened this issue Mar 26, 2017 · 2 comments
Labels

Comments

@sigv
Copy link
Contributor

sigv commented Mar 26, 2017

membership can be set on a user and it can specify either that the groups listed is a minimal set or that the groups listed in an inclusive set. There does not appear to be a possibility to set that through this module and that is not great for us. Is there a reason for why that attribute cannot be set on the custom defined type?

@deric
Copy link
Owner

deric commented Mar 28, 2017

The way how the DSL is processed now have to create accounts first, then deal with groups and its members. It might be complicated to enforce different membership levels for each user.

Currently the membership is set here.

Though, I could try to support something like this, but it will require some refactoring.

accounts::user_defaults:
    membership: minimal
accounts::groups:
  www-data:
    members: ['john']
accounts::users:
  john:
    groups: ["sudo", "users"]
    membership: minimal
  trudy:
    groups: ["sudo", "users"]
    membership: inclusive

@deric deric added the bug label Mar 28, 2017
@deric
Copy link
Owner

deric commented Jun 4, 2017

I've been thinking about this one, it's kind of complicated but it might solve multiple problems. We can either manage membership from user or group perspective. Current implementation misuses attribute_membership parameter. Ideally we should support different strategies depending on underlying provider. This module allows setting inclusive member of a group, while Puppet support the same from user's perspective. We're using

gpasswd -M user1,user2 mygroup

Probably it doesn't make sense to support both approaches at the same time, you'd have to choose.

usermod -G group1,group2 myuser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants