Module: Chef::Sugar::Architecture
Instance Method Summary collapse
-
#_32_bit?(node) ⇒ Boolean
(also: #i386?)
Determine if the current architecture is 32-bit.
-
#_64_bit?(node) ⇒ Boolean
Determine if the current architecture is 64-bit.
-
#intel?(node) ⇒ Boolean
Determine if the current architecture is Intel.
-
#ppc64?(node) ⇒ Boolean
Determine if the current architecture is Powerpc64 Big Endian.
-
#ppc64le?(node) ⇒ Boolean
Determine if the current architecture is Powerpc64 Little Endian.
-
#sparc?(node) ⇒ Boolean
Determine if the current architecture is SPARC.
Instance Method Details
#_32_bit?(node) ⇒ Boolean Also known as: i386?
TODO:
Make this more than “not 64-bit”
Determine if the current architecture is 32-bit
39 40 41 |
# File 'lib/chef/sugar/architecture.rb', line 39 def _32_bit?(node) !_64_bit?(node) end |
#_64_bit?(node) ⇒ Boolean
Determine if the current architecture is 64-bit
27 28 29 30 |
# File 'lib/chef/sugar/architecture.rb', line 27 def _64_bit?(node) %w(amd64 x86_64 ppc64 ppc64le s390x ia64 sparc64 aarch64 arch64 arm64) .include?(node['kernel']['machine']) end |
#intel?(node) ⇒ Boolean
Determine if the current architecture is Intel.
49 50 51 52 |
# File 'lib/chef/sugar/architecture.rb', line 49 def intel?(node) %w(i86pc) .include?(node['kernel']['machine']) end |
#ppc64?(node) ⇒ Boolean
Determine if the current architecture is Powerpc64 Big Endian
69 70 71 72 |
# File 'lib/chef/sugar/architecture.rb', line 69 def ppc64?(node) %w(ppc64) .include?(node['kernel']['machine']) end |
#ppc64le?(node) ⇒ Boolean
Determine if the current architecture is Powerpc64 Little Endian
79 80 81 82 |
# File 'lib/chef/sugar/architecture.rb', line 79 def ppc64le?(node) %w(ppc64le) .include?(node['kernel']['machine']) end |
#sparc?(node) ⇒ Boolean
Determine if the current architecture is SPARC.
59 60 61 62 |
# File 'lib/chef/sugar/architecture.rb', line 59 def sparc?(node) %w(sun4u sun4v) .include?(node['kernel']['machine']) end |