simplify os detection

This commit is contained in:
Christoph Hartmann 2015-10-07 18:46:24 +02:00
parent 2499fc72f9
commit 93df1656b5

View file

@ -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.'