facter 4.0.38 → 4.0.43

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/bin/facter +3 -4
  3. data/lib/facter.rb +138 -27
  4. data/lib/facter/custom_facts/core/aggregate.rb +51 -17
  5. data/lib/facter/custom_facts/core/execution.rb +27 -35
  6. data/lib/facter/custom_facts/core/execution/base.rb +42 -6
  7. data/lib/facter/custom_facts/util/directory_loader.rb +1 -1
  8. data/lib/facter/custom_facts/util/resolution.rb +40 -11
  9. data/lib/facter/facts/aix/disks.rb +1 -1
  10. data/lib/facter/facts/aix/kernel.rb +1 -1
  11. data/lib/facter/facts/aix/kernelmajversion.rb +1 -1
  12. data/lib/facter/facts/aix/kernelrelease.rb +1 -1
  13. data/lib/facter/facts/aix/kernelversion.rb +1 -1
  14. data/lib/facter/facts/aix/os/release.rb +1 -1
  15. data/lib/facter/facts/linux/cloud.rb +15 -0
  16. data/lib/facter/facts/linux/disks.rb +1 -1
  17. data/lib/facter/facts/linux/ec2_metadata.rb +5 -27
  18. data/lib/facter/facts/linux/ec2_userdata.rb +5 -27
  19. data/lib/facter/facts/linux/is_virtual.rb +7 -46
  20. data/lib/facter/facts/linux/virtual.rb +3 -58
  21. data/lib/facter/facts/solaris/disks.rb +1 -1
  22. data/lib/facter/facts/solaris/zones.rb +1 -1
  23. data/lib/facter/facts_utils/virtual_detector.rb +78 -0
  24. data/lib/facter/framework/cli/cli.rb +83 -36
  25. data/lib/facter/framework/cli/cli_launcher.rb +34 -38
  26. data/lib/facter/framework/config/fact_groups.rb +36 -2
  27. data/lib/facter/framework/core/cache_manager.rb +40 -23
  28. data/lib/facter/framework/core/fact_loaders/fact_loader.rb +14 -11
  29. data/lib/facter/framework/core/options/config_file_options.rb +5 -3
  30. data/lib/facter/framework/core/options/option_store.rb +27 -10
  31. data/lib/facter/framework/logging/logger.rb +1 -5
  32. data/lib/facter/patches/sysfilesystem/sys/statvfs.rb +92 -0
  33. data/lib/facter/resolvers/aix/os_level.rb +27 -0
  34. data/lib/facter/resolvers/cloud.rb +39 -0
  35. data/lib/facter/resolvers/dmi_decode.rb +1 -0
  36. data/lib/facter/resolvers/dmi_resolver.rb +2 -2
  37. data/lib/facter/resolvers/memory_resolver.rb +12 -14
  38. data/lib/facter/resolvers/mountpoints_resolver.rb +5 -2
  39. data/lib/facter/resolvers/networking_linux_resolver.rb +10 -5
  40. data/lib/facter/resolvers/processors_resolver.rb +5 -1
  41. data/lib/facter/resolvers/solaris/mountpoints.rb +60 -0
  42. data/lib/facter/resolvers/solaris/networking.rb +1 -1
  43. data/lib/facter/resolvers/utils/filesystem_helper.rb +3 -1
  44. data/lib/facter/version.rb +1 -1
  45. metadata +8 -4
  46. data/lib/facter/resolvers/aix/os_level_resolver.rb +0 -25
  47. data/lib/facter/resolvers/os_level_resolver.rb +0 -28
@@ -1,25 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Facter
4
- module Resolvers
5
- class OsLevel < BaseResolver
6
- @fact_list ||= {}
7
-
8
- class << self
9
- private
10
-
11
- def post_resolve(fact_name)
12
- @fact_list.fetch(fact_name) { read_oslevel(fact_name) }
13
- end
14
-
15
- def read_oslevel(fact_name)
16
- output = Facter::Core::Execution.execute('/usr/bin/oslevel -s', logger: log)
17
- @fact_list[:build] = output
18
- @fact_list[:kernel] = 'AIX'
19
-
20
- @fact_list[fact_name]
21
- end
22
- end
23
- end
24
- end
25
- end
@@ -1,28 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Facter
4
- module Resolvers
5
- class OsLevel < BaseResolver
6
- # build
7
-
8
- @fact_list ||= {}
9
-
10
- class << self
11
- private
12
-
13
- def post_resolve(fact_name)
14
- @fact_list.fetch(fact_name) { read_oslevel(fact_name) }
15
- end
16
-
17
- def read_oslevel(fact_name)
18
- output = Facter::Core::Execution.execute('/usr/bin/oslevel -s', logger: log)
19
-
20
- @fact_list[:build] = output unless output.empty?
21
- @fact_list[:kernel] = 'AIX'
22
-
23
- @fact_list[fact_name]
24
- end
25
- end
26
- end
27
- end
28
- end