diff --git a/lib/resources/os.rb b/lib/resources/os.rb index 039a93e29..a83ec7bda 100644 --- a/lib/resources/os.rb +++ b/lib/resources/os.rb @@ -6,6 +6,13 @@ module Vulcano::Resources class OS < Vulcano.resource(1) name 'os' + # reuse helper methods from backend + %w{redhat? debian? suse? bsd? solaris? linux? unix? windows?}.each do |os_family| + define_method((os_family).to_sym) do + vulcano.backend.os.send(os_family) + end + end + def [](name) vulcano.backend.os[name] end