dayglojesus / managedmac

Comprehensive Puppet module for OS X.
http://dayglojesus.github.io/managedmac/
Apache License 2.0
62 stars 21 forks source link

Macgroup provider: needs better GID/name conflict resolution #43

Closed dayglojesus closed 9 years ago

dayglojesus commented 9 years ago

Issue #41 exposes a limitation in the Macgroup provider.

Macgroup only uses the name -- never the GID -- when searching for a group. As a result, when a group with the same GID but different name as the one specified in the resource is encountered, it raises an error.

Some might argue that this stop is a "resource-safe" behaviour, but it differs from the Puppet native Group type/provider. The builtin provider will always use the GID as the authoritative identifier for a group, such that when group "foo" with gid 888 exists...

group { 'foo':
  ensure => 'present',
  gid    => '888',
}

...and you specify a resource of group "bar"...

group { 'bar':
  ensure => 'present',
  gid    => '888',
}

...Group "foo" will be renamed to "bar". Macgroup should be updated to reproduce the behaviour of the Puppet native type/provider.

dayglojesus commented 9 years ago

I am closing this because it's a non-issue.