With chefdk 0.11.0 on RHEL 6, using chef-solo for local data bags, and trying to create an account called "myname", I can set up an internal recipe to give that specific account a private called "myname" and set the gid based on that private group, and set the "group_id" in the databag to use the already created group called "myname", rather than having to write and synchronize the numeric gid in several places.
So far, so good.
However, , later running an internal recipe that activates a new group, such as "sysadmins", a group for which "myname" is a member, I get errors like this:
Generated at 2016-02-26 03:29:20 -0500
Chef::Exceptions::Exec: users_manage[sysadmin](local_users::sysadmin line 16) had an error: Chef::Exceptions::Exec: group[myname](/var/chef-solo/berks-cookbooks/users/providers/manage.rb line 162) had an error: Chef::Exceptions::Exec: groupmod -g 'myname' myname returned 3, expected 0
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.7.2/lib/chef/mixin/command.rb:158:in handle_command_failures' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.7.2/lib/chef/mixin/command.rb:104:inrun_command_and_return_stdout_stderr'
[spew deleted]
Notice the attempt to use "groupmod -g 'myname'", which shouldn't be necessary. The groupid is already correct. for the primary groupname of "myname". This kind of thing makes keeping gids synchronized among multiple applications that much more difficult.
With chefdk 0.11.0 on RHEL 6, using chef-solo for local data bags, and trying to create an account called "myname", I can set up an internal recipe to give that specific account a private called "myname" and set the gid based on that private group, and set the "group_id" in the databag to use the already created group called "myname", rather than having to write and synchronize the numeric gid in several places.
So far, so good.
However, , later running an internal recipe that activates a new group, such as "sysadmins", a group for which "myname" is a member, I get errors like this:
Generated at 2016-02-26 03:29:20 -0500 Chef::Exceptions::Exec: users_manage[sysadmin](local_users::sysadmin line 16) had an error: Chef::Exceptions::Exec: group[myname](/var/chef-solo/berks-cookbooks/users/providers/manage.rb line 162) had an error: Chef::Exceptions::Exec: groupmod -g 'myname' myname returned 3, expected 0 /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.7.2/lib/chef/mixin/command.rb:158:in
handle_command_failures' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.7.2/lib/chef/mixin/command.rb:104:in
run_command_and_return_stdout_stderr'[spew deleted]
Notice the attempt to use "groupmod -g 'myname'", which shouldn't be necessary. The groupid is already correct. for the primary groupname of "myname". This kind of thing makes keeping gids synchronized among multiple applications that much more difficult.