mirror of
https://github.com/inspec/inspec
synced 2024-11-30 08:30:39 +00:00
simplify os detection
This commit is contained in:
parent
2499fc72f9
commit
93df1656b5
1 changed files with 2 additions and 4 deletions
|
@ -25,11 +25,9 @@ class Group < Vulcano.resource(1)
|
|||
|
||||
# select group manager
|
||||
@group_provider = nil
|
||||
case vulcano.os[:family]
|
||||
when 'ubuntu', 'debian', 'redhat', 'fedora', 'arch', 'darwin', 'freebsd'
|
||||
# use /etc/group
|
||||
if vulcano.os.unix?
|
||||
@group_provider = UnixGroup.new(vulcano)
|
||||
when 'windows'
|
||||
elsif vulcano.os.windows?
|
||||
@group_provider = WindowsGroup.new(vulcano)
|
||||
else
|
||||
return skip_resource 'The `group` resource is not supported on your OS yet.'
|
||||
|
|
Loading…
Reference in a new issue