mirror of
https://github.com/inspec/inspec
synced 2025-02-18 23:18:53 +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
|
# select group manager
|
||||||
@group_provider = nil
|
@group_provider = nil
|
||||||
case vulcano.os[:family]
|
if vulcano.os.unix?
|
||||||
when 'ubuntu', 'debian', 'redhat', 'fedora', 'arch', 'darwin', 'freebsd'
|
|
||||||
# use /etc/group
|
|
||||||
@group_provider = UnixGroup.new(vulcano)
|
@group_provider = UnixGroup.new(vulcano)
|
||||||
when 'windows'
|
elsif vulcano.os.windows?
|
||||||
@group_provider = WindowsGroup.new(vulcano)
|
@group_provider = WindowsGroup.new(vulcano)
|
||||||
else
|
else
|
||||||
return skip_resource 'The `group` resource is not supported on your OS yet.'
|
return skip_resource 'The `group` resource is not supported on your OS yet.'
|
||||||
|
|
Loading…
Add table
Reference in a new issue