Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-3653

Unable to create/force empty Windows groups

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Done
    • Affects Version/s: PUP 3.7.3
    • Fix Version/s: PUP 3.8.0, PUP 4.1.0
    • Component/s: None
    • Environment:

      Windows 2008 R2, Windows 2012, Windows 2012 R2

    • Template:
    • Story Points:
      2
    • Sprint:
      Windows 2015-04-08, Windows 2015-04-22
    • Release Notes:
      Bug Fix

      Description

      In Windows, many groups are built-in and cannot be removed, therefore ensure => absent is useless. Another approach would be to define the group as present with no members. For example:

      group { 'Guests':
        ensure  => 'present',
        members => [],
      }
      

      Unfortunately, this will not remove any members of the built-in Guests group, but instead leave any members existing.

      The underlying goal is to ensure that all unnecessary groups are empty.

      Update for Puppet 4

      In PUP 4.x+, because groups are not authoritative by default, you need the add auth_membership => true to the mix to force an existing group to empty.

      group { 'Guests':
        ensure  => 'present',
        members => [],
        auth_membership => true,
      }
      

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  cstephens Chris Stephens
                  QA Contact:
                  Ryan Gard
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: