Skip to content

user.present:groups vs group.present:members #28706

Closed

Description

@kkaig

Hi, Salt has an option in group.present to set a list of members, but this conflicts with the user.present:groups list. If you don't pass a list of groups in user.present, salt assumes the empty list, and (as per the docs) it will remove the user from all groups.

The following code will work, but will always report a change, since it removes myuser from all groups, then adds it back to the deploy group:

myuser:
  user.present:
    - shell: /bin/bash
deploy:
  group.present:
    - members:
      - myuser

The correct behaviour would be for salt not to change the user's groups when running user.present unless the groups: [] list is explicitly passed.

Thanks

Activity

  1. added
    bug
    severity-medium
    help-wanted
    P4
    Platform
    on Nov 11, 2015
  2. added this to the Approved milestone on Nov 11, 2015
  3. jfindlay commented on Nov 11, 2015

    @jfindlay
    Contributor

    @kkaig, thanks for the report.

  4. added a commit that references this issue on Feb 2, 2016
  5. rallytime commented on Mar 27, 2016

    @rallytime
    Contributor

    @kkaig Does the fix in #30824 help resolve this issue for you?

  6. added
    fixed-pls-verify
    on Mar 27, 2016
  7. added a commit that references this issue on Apr 8, 2016
  8. added 2 commits that reference this issue on Apr 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4PlatformState-Modulebugfixed-pls-verifyhelp-wantedseverity-medium

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions