# class Chef::Provider::Group::Suse

### Public Instance Methods

add_member(member) click to toggle source

    # File lib/chef/provider/group/suse.rb, line 52
    def add_member(member)
      shell_out!("groupmod -A #{member} #{@new_resource.group_name}")
    end

define_resource_requirements() click to toggle source
Calls superclass method Chef::Provider::Group::Groupadd#define_resource_requirements

    # File lib/chef/provider/group/suse.rb, line 33
    def define_resource_requirements
      super
      requirements.assert(:all_actions) do |a|
        a.assertion { ::File.exists?("/usr/sbin/groupmod") }
        a.failure_message Chef::Exceptions::Group, "Could not find binary /usr/sbin/groupmod for #{@new_resource.name}"
        # No whyrun alternative: this component should be available in the base install of any given system that uses it
      end
    end

load_current_resource() click to toggle source
Calls superclass method Chef::Provider::Group::Groupadd#load_current_resource

    # File lib/chef/provider/group/suse.rb, line 29
    def load_current_resource
      super
    end

remove_member(member) click to toggle source

    # File lib/chef/provider/group/suse.rb, line 56
    def remove_member(member)
      shell_out!("groupmod -R #{member} #{@new_resource.group_name}")
    end

set_members(members) click to toggle source

    # File lib/chef/provider/group/suse.rb, line 42
    def set_members(members)
      unless @current_resource.members.empty?
        shell_out!("groupmod -R #{@current_resource.members.join(',')} #{@new_resource.group_name}")
      end

      unless members.empty?
        shell_out!("groupmod -A #{members.join(',')} #{@new_resource.group_name}")
      end
    end