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

Unable to create/force empty Windows groups

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Done
    • PUP 3.7.3
    • PUP 3.8.0, PUP 4.1.0
    • None
    • Windows 2008 R2, Windows 2012, Windows 2012 R2

    • 2
    • Windows 2015-04-08, Windows 2015-04-22
    • 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

            People

              Unassigned Unassigned
              cstephens Chris Stephens
              Ryan Gard Ryan Gard
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support