I'm trying to manage a Windows server with chef, and need to create some users, add them to a group, and add that group to another group.
user 'test.user' do password 'password' action :create end group 'TestGroup' do action :create members [ 'test.user' ] append true end group 'OtherGroup' do # This is line 43 action :create members [ 'TestGroup' ] append true end
That results in an error:
[2015-02-12T09:54:35+00:00] FATAL: ArgumentError: group[OtherGroup] (users::staff line 43) had an error: ArgumentError: A new member could not be added to a local group because the member has the wrong account type.
It's like Chef can't add a group to a group. Adding users to a group is fine.
Oddly it only seems to affect a custom group. I can add to the built in Users and Administrators groups fine.
group 'Administrators' do action :modify members [ 'TestGroup' ] append true end
I have also tried creating the
OtherGroup empty first, and then :modifying it, but the same problem happens.