lib/puppet/provider/nameservice/directoryservice.rb in puppet-2.6.4 vs lib/puppet/provider/nameservice/directoryservice.rb in puppet-2.6.5
- old
+ new
@@ -440,11 +440,11 @@
end
end
def remove_unwanted_members(current_members, new_members)
current_members.each do |member|
- if not new_members.include?(member)
+ if not new_members.flatten.include?(member)
cmd = [:dseditgroup, "-o", "edit", "-n", ".", "-d", member, @resource[:name]]
begin
execute(cmd)
rescue Puppet::ExecutionFailure => detail
fail("Could not remove #{member} from group: #{@resource.name}, #{detail}")
@@ -452,10 +452,10 @@
end
end
end
def add_members(current_members, new_members)
- new_members.each do |new_member|
+ new_members.flatten.each do |new_member|
if current_members.nil? or not current_members.include?(new_member)
cmd = [:dseditgroup, "-o", "edit", "-n", ".", "-a", new_member, @resource[:name]]
begin
execute(cmd)
rescue Puppet::ExecutionFailure => detail