Module: Puppet::Util::Platform Private
- Defined in:
- lib/puppet/util/platform.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Constant Summary collapse
- FIPS_STATUS_FILE =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
"/proc/sys/crypto/fips_enabled".freeze
- WINDOWS_FIPS_REGISTRY_KEY =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
'System\\CurrentControlSet\\Control\\Lsa\\FipsAlgorithmPolicy'.freeze
Class Method Summary collapse
- .default_paths ⇒ Object private
- .fips_enabled? ⇒ Boolean private
- .jruby? ⇒ Boolean private
- .jruby_fips? ⇒ Boolean private
- .solaris? ⇒ Boolean private
- .windows? ⇒ Boolean private
Class Method Details
.default_paths ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
22 23 24 25 26 |
# File 'lib/puppet/util/platform.rb', line 22 def default_paths return [] if windows? %w{/usr/sbin /sbin} end |
.fips_enabled? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
44 45 46 |
# File 'lib/puppet/util/platform.rb', line 44 def fips_enabled? @fips_enabled end |
.jruby? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
49 50 51 |
# File 'lib/puppet/util/platform.rb', line 49 def self.jruby? RUBY_PLATFORM == 'java' end |
.jruby_fips? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/puppet/util/platform.rb', line 53 def jruby_fips? @@jruby_fips ||= if RUBY_PLATFORM == 'java' require 'java' begin require 'openssl' false rescue LoadError, NameError true end else false end end |
.solaris? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
17 18 19 |
# File 'lib/puppet/util/platform.rb', line 17 def solaris? RUBY_PLATFORM.include?('solaris') end |
.windows? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
7 8 9 10 11 12 13 14 |
# File 'lib/puppet/util/platform.rb', line 7 def windows? # Ruby only sets File::ALT_SEPARATOR on Windows and the Ruby standard # library uses that to test what platform it's on. In some places we # would use Puppet.features.microsoft_windows?, but this method can be # used to determine the behavior of the underlying system without # requiring features to be initialized and without side effect. !!File::ALT_SEPARATOR end |