diff options
author | Thom May <thom@may.lt> | 2016-03-16 11:57:47 +0000 |
---|---|---|
committer | Thom May <thom@may.lt> | 2016-03-16 11:57:47 +0000 |
commit | 1ec54c1c3577e3a74e8b2ae7e4354894eb60c772 (patch) | |
tree | f306e8c09d955949fbf7a6cb61ddbf93b32115df | |
parent | 3174ec22b6987629a9f392ef9459ca8c0988d756 (diff) | |
parent | 603f8ea366302964dff4d439501065d99a7ff2fa (diff) | |
download | chef-1ec54c1c3577e3a74e8b2ae7e4354894eb60c772.tar.gz |
Merge pull request #4701 from mawinter69/master
fix for https://github.com/chef/chef/issues/4689
-rw-r--r-- | lib/chef/provider/group/suse.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/chef/provider/group/suse.rb b/lib/chef/provider/group/suse.rb index f6f4fa1e11..a79038e25e 100644 --- a/lib/chef/provider/group/suse.rb +++ b/lib/chef/provider/group/suse.rb @@ -39,12 +39,14 @@ class Chef end def set_members(members) - unless @current_resource.members.empty? - shell_out!("groupmod -R #{@current_resource.members.join(',')} #{@new_resource.group_name}") + to_delete = @current_resource.members - members + to_delete.each do |member| + remove_member(member) end - unless members.empty? - shell_out!("groupmod -A #{members.join(',')} #{@new_resource.group_name}") + to_add = members - @current_resource.members + to_add.each do |member| + add_member(member) end end |