Module: Inspec::Resources::UserManagementSelector
Overview
This file contains two resources, the ‘user` and `users` resource. The `user` resource is optimized for requests that verify specific users that you know upfront for testing. If you need to query all users or search specific users with certain properties, use the `users` resource.
Instance Method Summary collapse
- 
  
    
      #select_user_manager(os)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    select user provider based on the operating system returns nil, if no user manager was found for the operating system. 
Instance Method Details
#select_user_manager(os) ⇒ Object
select user provider based on the operating system returns nil, if no user manager was found for the operating system
| 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | # File 'lib/resources/users.rb', line 15 def select_user_manager(os) if os.linux? LinuxUser.new(inspec) elsif os.windows? WindowsUser.new(inspec) elsif ['darwin'].include?(os[:family]) DarwinUser.new(inspec) elsif ['freebsd'].include?(os[:family]) FreeBSDUser.new(inspec) elsif ['aix'].include?(os[:family]) AixUser.new(inspec) elsif os.solaris? SolarisUser.new(inspec) elsif ['hpux'].include?(os[:family]) HpuxUser.new(inspec) end end |