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?)
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.
Instance Method Details
#arch_linux?(node) ⇒ Boolean Also known as: arch?
Determine if the current node is a member of the arch family.
29 30 31 |
# File 'lib/chef/sugar/platform_family.rb', line 29 def arch_linux?(node) node['platform_family'] == 'arch' end |
#debian?(node) ⇒ Boolean
Determine if the current node is a member of the debian family.
41 42 43 |
# File 'lib/chef/sugar/platform_family.rb', line 41 def debian?(node) node['platform_family'] == 'debian' end |
#fedora?(node) ⇒ Boolean
Determine if the current node is a member of the fedora family.
52 53 54 |
# File 'lib/chef/sugar/platform_family.rb', line 52 def fedora?(node) node['platform_family'] == 'fedora' end |
#freebsd?(node) ⇒ Boolean
Determine if the current node is a member of the freebsd family.
63 64 65 |
# File 'lib/chef/sugar/platform_family.rb', line 63 def freebsd?(node) node['platform_family'] == 'freebsd' end |
#gentoo?(node) ⇒ Boolean
Determine if the current node is a member of the arch family.
74 75 76 |
# File 'lib/chef/sugar/platform_family.rb', line 74 def gentoo?(node) node['platform_family'] == 'gentoo' end |
#linux?(node) ⇒ Boolean
Determine if the current system is a linux derivative
154 155 156 157 158 159 160 161 162 163 164 |
# File 'lib/chef/sugar/platform_family.rb', line 154 def linux?(node) %w( arch debian fedora gentoo rhel slackware suse ).include?(node['platform_family']) end |
#mac_os_x?(node) ⇒ Boolean Also known as: osx?, mac?
Determine if the current node is a member of the OSX family.
85 86 87 |
# File 'lib/chef/sugar/platform_family.rb', line 85 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.
98 99 100 |
# File 'lib/chef/sugar/platform_family.rb', line 98 def openbsd?(node) node['platform_family'] == 'openbsd' end |
#rhel?(node) ⇒ Boolean Also known as: redhat?
Determine if the current node is a member of the redhat family.
109 110 111 |
# File 'lib/chef/sugar/platform_family.rb', line 109 def rhel?(node) node['platform_family'] == 'rhel' end |
#slackware?(node) ⇒ Boolean
Determine if the current node is a member of the slackware family.
121 122 123 |
# File 'lib/chef/sugar/platform_family.rb', line 121 def slackware?(node) node['platform_family'] == 'slackware' end |
#suse?(node) ⇒ Boolean
Determine if the current node is a member of the suse family.
132 133 134 |
# File 'lib/chef/sugar/platform_family.rb', line 132 def suse?(node) node['platform_family'] == 'suse' end |
#windows?(node) ⇒ Boolean
Determine if the current node is a member of the windows family.
143 144 145 |
# File 'lib/chef/sugar/platform_family.rb', line 143 def windows?(node) node['platform_family'] == 'windows' end |