class Chef::Provider::Group::Solaris
Public Instance Methods
Source
# File lib/chef/provider/group/solaris.rb, line 51 def add_member(member) shell_out!("usermod", "-G", "+#{new_resource.group_name}", member) end
Source
# File lib/chef/provider/group/solaris.rb, line 34 def define_resource_requirements super requirements.assert(:all_actions) do |a| a.assertion { ::File.exist?("/usr/sbin/usermod") && ::File.exist?("/usr/sbin/groupmod") } a.failure_message Chef::Exceptions::Group, "Could not find binary /usr/sbin/usermod or /usr/sbin/groupmod for #{new_resource}" # No whyrun alternative: this component should be available in the base install of any given system that uses it end end
Calls superclass method
Chef::Provider::Group::Groupadd#define_resource_requirements
Source
# File lib/chef/provider/group/solaris.rb, line 30 def load_current_resource super end
Calls superclass method
Chef::Provider::Group::Groupadd#load_current_resource
Source
# File lib/chef/provider/group/solaris.rb, line 55 def remove_member(member) shell_out!("usermod", "-G", "-#{new_resource.group_name}", member) end
Source
# File lib/chef/provider/group/solaris.rb, line 44 def set_members(members) # Set the group to have exactly the list of members passed to it. unless members.empty? shell_out!("groupmod", "-U", members.join(","), new_resource.group_name) end end