module Chef::Sugar::PlatformFamily
Public Instance Methods
Determine if the current node is a member of the arch family.
@param [Chef::Node] node
@return [Boolean]
# File lib/chef/sugar/platform_family.rb, line 32 def arch_linux?(node) node['platform_family'] == 'arch' end
Determine if the current node is a member of the debian family.
@param [Chef::Node] node
@return [Boolean]
# File lib/chef/sugar/platform_family.rb, line 44 def debian?(node) node['platform_family'] == 'debian' end
Determine if the current node is a member of the fedora family.
@param [Chef::Node] node
@return [Boolean]
# File lib/chef/sugar/platform_family.rb, line 55 def fedora?(node) node['platform_family'] == 'fedora' end
Determine if the current node is a member of the freebsd family.
@param [Chef::Node] node
@return [Boolean]
# File lib/chef/sugar/platform_family.rb, line 66 def freebsd?(node) node['platform_family'] == 'freebsd' end
Determine if the current node is a member of the arch family.
@param [Chef::Node] node
@return [Boolean]
# File lib/chef/sugar/platform_family.rb, line 77 def gentoo?(node) node['platform_family'] == 'gentoo' end
Determine if the current system is a linux derivative
@param [Chef::Node] node
@return [Boolean]
# File lib/chef/sugar/platform_family.rb, line 169 def linux?(node) node['os'] == 'linux' end
Determine if the current node is a member of the OSX family.
@param [Chef::Node] node
@return [Boolean]
# File lib/chef/sugar/platform_family.rb, line 88 def mac_os_x?(node) node['platform_family'] == 'mac_os_x' end
Determine if the current node is a member of the openbsd family.
@param [Chef::Node] node
@return [Boolean]
# File lib/chef/sugar/platform_family.rb, line 101 def openbsd?(node) node['platform_family'] == 'openbsd' end
Determine if the current node is a member of the redhat family.
@param [Chef::Node] node
@return [Boolean]
# File lib/chef/sugar/platform_family.rb, line 112 def rhel?(node) node['platform_family'] == 'rhel' end
Determine if the current node is a member of the slackware family.
@param [Chef::Node] node
@return [Boolean]
# File lib/chef/sugar/platform_family.rb, line 125 def slackware?(node) node['platform_family'] == 'slackware' end
Determine if the current node is a member of the suse family.
@param [Chef::Node] node
@return [Boolean]
# File lib/chef/sugar/platform_family.rb, line 136 def suse?(node) node['platform_family'] == 'suse' end
Determine if the current node is a member of the windows family.
@param [Chef::Node] node
@return [Boolean]
# File lib/chef/sugar/platform_family.rb, line 147 def windows?(node) node['platform_family'] == 'windows' end
Determine if the current node is a member of the wrlinux family.
@param [Chef::Node] node
@return [Boolean]
# File lib/chef/sugar/platform_family.rb, line 158 def wrlinux?(node) node['platform_family'] == 'wrlinux' end