class Chef::Provider::Group::Solaris
Public Instance Methods
add_member(member)
click to toggle source
# File lib/chef/provider/group/solaris.rb, line 51 def add_member(member) shell_out!("usermod", "-G", "+#{new_resource.group_name}", member) end
define_resource_requirements()
click to toggle source
Calls superclass method
Chef::Provider::Group::Groupadd#define_resource_requirements
# File lib/chef/provider/group/solaris.rb, line 34 def define_resource_requirements super requirements.assert(:all_actions) do |a| a.assertion { ::TargetIO::File.exist?("/usr/sbin/usermod") && ::TargetIO::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
load_current_resource()
click to toggle source
Calls superclass method
Chef::Provider::Group::Groupadd#load_current_resource
# File lib/chef/provider/group/solaris.rb, line 30 def load_current_resource super end
remove_member(member)
click to toggle source
# File lib/chef/provider/group/solaris.rb, line 55 def remove_member(member) shell_out!("usermod", "-G", "-#{new_resource.group_name}", member) end
set_members(members)
click to toggle 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