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