Module: Chef::Sugar::PlatformFamily
- Extended by:
- PlatformFamily
- Included in:
- PlatformFamily
- Defined in:
- lib/chef/sugar/platform_family.rb
Instance Method Summary collapse
-
#arch_linux?(node) ⇒ Boolean
(also: #arch?)
Determine if the current node is a member of the arch family.
-
#debian?(node) ⇒ Boolean
Determine if the current node is a member of the debian family.
-
#fedora?(node) ⇒ Boolean
Determine if the current node is a member of the fedora family.
-
#freebsd?(node) ⇒ Boolean
Determine if the current node is a member of the freebsd family.
-
#gentoo?(node) ⇒ Boolean
Determine if the current node is a member of the arch family.
-
#linux?(node) ⇒ Boolean
Determine if the current system is a linux derivative.
-
#mac_os_x?(node) ⇒ Boolean
(also: #osx?, #mac?)
Determine if the current node is a member of the OSX family.
-
#openbsd?(node) ⇒ Boolean
Determine if the current node is a member of the openbsd family.
-
#rhel?(node) ⇒ Boolean
(also: #redhat?, #el?)
Determine if the current node is a member of the redhat family.
-
#slackware?(node) ⇒ Boolean
Determine if the current node is a member of the slackware family.
-
#suse?(node) ⇒ Boolean
Determine if the current node is a member of the suse family.
-
#windows?(node) ⇒ Boolean
Determine if the current node is a member of the windows family.
-
#wrlinux?(node) ⇒ Boolean
Determine if the current node is a member of the wrlinux family.
Instance Method Details
#arch_linux?(node) ⇒ Boolean Also known as: arch?
Determine if the current node is a member of the arch family.
32 33 34 |
# File 'lib/chef/sugar/platform_family.rb', line 32 def arch_linux?(node) node['platform_family'] == 'arch' end |
#debian?(node) ⇒ Boolean
Determine if the current node is a member of the debian family.
44 45 46 |
# File 'lib/chef/sugar/platform_family.rb', line 44 def debian?(node) node['platform_family'] == 'debian' end |
#fedora?(node) ⇒ Boolean
Determine if the current node is a member of the fedora family.
55 56 57 |
# File 'lib/chef/sugar/platform_family.rb', line 55 def fedora?(node) node['platform_family'] == 'fedora' end |
#freebsd?(node) ⇒ Boolean
Determine if the current node is a member of the freebsd family.
66 67 68 |
# File 'lib/chef/sugar/platform_family.rb', line 66 def freebsd?(node) node['platform_family'] == 'freebsd' end |
#gentoo?(node) ⇒ Boolean
Determine if the current node is a member of the arch family.
77 78 79 |
# File 'lib/chef/sugar/platform_family.rb', line 77 def gentoo?(node) node['platform_family'] == 'gentoo' end |
#linux?(node) ⇒ Boolean
Determine if the current system is a linux derivative
169 170 171 |
# File 'lib/chef/sugar/platform_family.rb', line 169 def linux?(node) node['os'] == 'linux' end |
#mac_os_x?(node) ⇒ Boolean Also known as: osx?, mac?
Determine if the current node is a member of the OSX family.
88 89 90 |
# File 'lib/chef/sugar/platform_family.rb', line 88 def mac_os_x?(node) node['platform_family'] == 'mac_os_x' end |
#openbsd?(node) ⇒ Boolean
Determine if the current node is a member of the openbsd family.
101 102 103 |
# File 'lib/chef/sugar/platform_family.rb', line 101 def openbsd?(node) node['platform_family'] == 'openbsd' end |
#rhel?(node) ⇒ Boolean Also known as: redhat?, el?
Determine if the current node is a member of the redhat family.
112 113 114 |
# File 'lib/chef/sugar/platform_family.rb', line 112 def rhel?(node) node['platform_family'] == 'rhel' end |
#slackware?(node) ⇒ Boolean
Determine if the current node is a member of the slackware family.
125 126 127 |
# File 'lib/chef/sugar/platform_family.rb', line 125 def slackware?(node) node['platform_family'] == 'slackware' end |
#suse?(node) ⇒ Boolean
Determine if the current node is a member of the suse family.
136 137 138 |
# File 'lib/chef/sugar/platform_family.rb', line 136 def suse?(node) node['platform_family'] == 'suse' end |
#windows?(node) ⇒ Boolean
Determine if the current node is a member of the windows family.
147 148 149 |
# File 'lib/chef/sugar/platform_family.rb', line 147 def windows?(node) node['platform_family'] == 'windows' end |
#wrlinux?(node) ⇒ Boolean
Determine if the current node is a member of the wrlinux family.
158 159 160 |
# File 'lib/chef/sugar/platform_family.rb', line 158 def wrlinux?(node) node['platform_family'] == 'wrlinux' end |