├── tmp └── .gitkeep ├── .github ├── reaction.yml ├── dependabot.yml └── workflows │ └── ci.yml ├── Gemfile ├── lib ├── fauxhai │ ├── version.rb │ ├── exception.rb │ ├── keys │ │ ├── id_rsa.pub │ │ ├── id_dsa.pub │ │ ├── id_dsa │ │ └── id_rsa │ ├── platforms │ │ ├── chefspec │ │ │ └── 0.6.1.json │ │ ├── openbsd │ │ │ └── 6.2.json │ │ ├── dragonfly4 │ │ │ └── 4.8-RELEASE.json │ │ ├── freebsd │ │ │ ├── 11.2.json │ │ │ └── 12.1.json │ │ └── windows │ │ │ ├── 2012.json │ │ │ ├── 2012R2.json │ │ │ ├── 2016.json │ │ │ ├── 2019.json │ │ │ ├── 8.1.json │ │ │ └── 10.json │ ├── runner.rb │ ├── fetcher.rb │ ├── runner │ │ ├── windows.rb │ │ └── default.rb │ └── mocker.rb └── fauxhai.rb ├── .gitignore ├── bin └── fauxhai ├── spec ├── spec_helper.rb └── mocker_spec.rb ├── LICENSE ├── fauxhai-ng.gemspec ├── examples ├── chefspec.md └── rspec-chef.md ├── PLATFORMS.md ├── CONTRIBUTING.md ├── Rakefile ├── platforms.json └── README.md /tmp/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.github/reaction.yml: -------------------------------------------------------------------------------- 1 | reactionComment: false 2 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | gemspec 3 | -------------------------------------------------------------------------------- /lib/fauxhai/version.rb: -------------------------------------------------------------------------------- 1 | module Fauxhai 2 | VERSION = "9.3.0".freeze 3 | end 4 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: bundler 4 | directory: "/" 5 | schedule: 6 | interval: daily 7 | open-pull-requests-limit: 10 8 | -------------------------------------------------------------------------------- /lib/fauxhai/exception.rb: -------------------------------------------------------------------------------- 1 | module Fauxhai 2 | module Exception 3 | class InvalidPlatform < ArgumentError; end 4 | class InvalidVersion < ArgumentError; end 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.gem 2 | *.rbc 3 | .bundle 4 | .config 5 | .yardoc 6 | Gemfile.lock 7 | InstalledFiles 8 | _yardoc 9 | coverage 10 | doc/ 11 | lib/bundler/man 12 | pkg 13 | rdoc 14 | spec/reports 15 | test/tmp 16 | test/version_tmp 17 | tmp 18 | vendor 19 | .kitchen 20 | 21 | # ohai makes this file 22 | 1 23 | 24 | # output directory 25 | _out 26 | -------------------------------------------------------------------------------- /lib/fauxhai/keys/id_rsa.pub: -------------------------------------------------------------------------------- 1 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCtLCeqtqr/HbnORckw1ukdLhpfGoOPFi5/esKEokzTqq1gsgQ2V8emmyjfq1i6XXfRtSBxkdlHv/GWdP5wBTuE2G85MzBkVSQPvmwQN8lX/JMPEEtKXkeOo0o92/PiSmvY4eRsdF0mw40Uvg7jtE3f3fxj497kzh5fKtkrHnF4x9gXCbVdr3FqXJfggR5IJwAxToerbK7x/uRS+7YuZI9Pip3tt14nv9ezwXcuGb/tvjWOZINiFl8izVIFKi7sxfTX09p4NgamxRS7TD2Yd0jT8nEoF9UZTsgXcJ1kDSx7N7NxFfNfP6rCdOGRRz4gUhXtsUjG/XkxPeCwZ7A9VnOD fauxhai.local 2 | -------------------------------------------------------------------------------- /lib/fauxhai.rb: -------------------------------------------------------------------------------- 1 | module Fauxhai 2 | autoload :Exception, "fauxhai/exception" 3 | autoload :Fetcher, "fauxhai/fetcher" 4 | autoload :Mocker, "fauxhai/mocker" 5 | autoload :VERSION, "fauxhai/version" 6 | 7 | def self.root 8 | @@root ||= File.expand_path("../../", __FILE__) 9 | end 10 | 11 | def self.mock(*args, &block) 12 | Fauxhai::Mocker.new(*args, &block) 13 | end 14 | 15 | def self.fetch(*args, &block) 16 | Fauxhai::Fetcher.new(*args, &block) 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/fauxhai/platforms/chefspec/0.6.1.json: -------------------------------------------------------------------------------- 1 | { 2 | "domain": "local", 3 | "fqdn": "chefspec.local", 4 | "hostname": "chefspec", 5 | "ipaddress": "127.0.0.1", 6 | "kernel": { 7 | "machine": "i386" 8 | }, 9 | "languages": { 10 | "ruby": { 11 | "bin_dir": "/usr/local/bin", 12 | "gem_bin": "/usr/local/bin/gem", 13 | "gems_dir": "/usr/local/gems", 14 | "ruby_bin": "/usr/local/bin/ruby" 15 | } 16 | }, 17 | "os": "chefspec", 18 | "os_version": "0.6.1", 19 | "platform_family": "chefspec" 20 | } -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | pull_request: 5 | push: 6 | branches: 7 | - master 8 | 9 | jobs: 10 | test: 11 | runs-on: ubuntu-latest 12 | strategy: 13 | matrix: 14 | ruby: [ '2.4', '2.5', '2.6', '2.7', '3.0'] 15 | name: Validate JSON on Ruby ${{ matrix.ruby }} 16 | steps: 17 | - uses: actions/checkout@v2 18 | - uses: ruby/setup-ruby@v1 19 | with: 20 | ruby-version: ${{ matrix.ruby }} 21 | bundler-cache: true 22 | - run: bundle exec rake -------------------------------------------------------------------------------- /bin/fauxhai: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | lib = File.expand_path(File.dirname(__FILE__) + "../../lib") 4 | $LOAD_PATH.unshift(lib) if File.directory?(lib) && !$LOAD_PATH.include?(lib) 5 | 6 | args = ARGV.dup 7 | ARGV.clear 8 | 9 | unless (args & ["-v", "--version"]).empty? 10 | require "fauxhai/version" 11 | puts Fauxhai::VERSION 12 | exit(0) 13 | end 14 | 15 | unless (args & ["-h", "--help"]).empty? 16 | puts "Usage: fauxhai" 17 | puts "(There are no flags or options)" 18 | exit(0) 19 | end 20 | 21 | require "fauxhai" 22 | require "fauxhai/runner" 23 | Fauxhai::Runner.new(args) 24 | -------------------------------------------------------------------------------- /lib/fauxhai/keys/id_dsa.pub: -------------------------------------------------------------------------------- 1 | ssh-dss AAAAB3NzaC1kc3MAAACBAJFo9BLAw4WKEs5hgipk5m423FzBsDXCZSMcC9ca/om/1VYzMqImixGe3uICDzNFUWxFoLJTQAOccyzo6MXZiQqwWJDLFi5qOSr6w2XcMyE+zd4wOyMoDiVM5fizmG8K3FzrqvGjwBcHcBdOQnavSijoj38DN25J9zhrid5BY4WlAAAAFQDxXrCyG52XCzn3FV4ej38wJBkomQAAAIBovGPJ4mP2P6BK8lHl0PPbktwQbWlpJ13oz6REJFDVcUi7vV26bX/BjQX+ohzZQzljdz1SpUbPc/8nuA4darYkVh91eBi307EN8IdxRHj2eBgp/ZG4yshIebG3WHrwJD/xUjjZ1MRfyDT1ermVi4LvjjPgWDxLZnPpMaR6S1nzgQAAAIEAj0Vd6DCWslvlsZ8+N53HWsqPi3gnx35JoLPz9Z2epkKIKqmEHav+93G3hdfztVa4I4t3phoPniQchYryF5+RNg8hqxKzjNtrIqUYCeuf2NJrksNsH7OZygPHZpqt4kTuwAGZxjxEGfAI0y8DhkU2ntp2LnzRnWH106BQBCmcXwo= fauxhai.local 2 | -------------------------------------------------------------------------------- /spec/spec_helper.rb: -------------------------------------------------------------------------------- 1 | require "rspec" 2 | require "rspec/its" 3 | require "fauxhai" 4 | 5 | RSpec.configure do |config| 6 | # Basic configuraiton 7 | config.run_all_when_everything_filtered = true 8 | config.filter_run(:focus) 9 | config.add_formatter("documentation") 10 | 11 | # Run specs in random order to surface order dependencies. If you find an 12 | # order dependency and want to debug it, you can fix the order by providing 13 | # the seed, which is printed after each run. 14 | # --seed 1234 15 | config.order = "random" 16 | config.seed = ENV["SEED"].to_i if ENV["SEED"] 17 | 18 | # Enable full backtrace if $DEBUG is set. 19 | config.full_backtrace = true if ENV["DEBUG"] 20 | end 21 | -------------------------------------------------------------------------------- /lib/fauxhai/keys/id_dsa: -------------------------------------------------------------------------------- 1 | -----BEGIN DSA PRIVATE KEY----- 2 | MIIBvAIBAAKBgQCRaPQSwMOFihLOYYIqZOZuNtxcwbA1wmUjHAvXGv6Jv9VWMzKi 3 | JosRnt7iAg8zRVFsRaCyU0ADnHMs6OjF2YkKsFiQyxYuajkq+sNl3DMhPs3eMDsj 4 | KA4lTOX4s5hvCtxc66rxo8AXB3AXTkJ2r0oo6I9/AzduSfc4a4neQWOFpQIVAPFe 5 | sLIbnZcLOfcVXh6PfzAkGSiZAoGAaLxjyeJj9j+gSvJR5dDz25LcEG1paSdd6M+k 6 | RCRQ1XFIu71dum1/wY0F/qIc2UM5Y3c9UqVGz3P/J7gOHWq2JFYfdXgYt9OxDfCH 7 | cUR49ngYKf2RuMrISHmxt1h68CQ/8VI42dTEX8g09Xq5lYuC744z4Fg8S2Zz6TGk 8 | ektZ84ECgYEAj0Vd6DCWslvlsZ8+N53HWsqPi3gnx35JoLPz9Z2epkKIKqmEHav+ 9 | 93G3hdfztVa4I4t3phoPniQchYryF5+RNg8hqxKzjNtrIqUYCeuf2NJrksNsH7OZ 10 | ygPHZpqt4kTuwAGZxjxEGfAI0y8DhkU2ntp2LnzRnWH106BQBCmcXwoCFQDry5iu 11 | Lv4xvy0I7w/bDtXIGj5RYA== 12 | -----END DSA PRIVATE KEY----- 13 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 Seth Vargo and CustomInk, LCC 2 | 3 | MIT License 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | "Software"), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /fauxhai-ng.gemspec: -------------------------------------------------------------------------------- 1 | lib = File.expand_path("../lib", __FILE__) 2 | $:.unshift(lib) unless $:.include?(lib) 3 | require "fauxhai/version" 4 | 5 | Gem::Specification.new do |spec| 6 | spec.name = "fauxhai-ng" 7 | spec.version = Fauxhai::VERSION 8 | spec.authors = ["Seth Vargo", "Tim Smith"] 9 | spec.email = ["sethvargo@gmail.com", "tsmith84@gmail.com"] 10 | spec.description = "Easily mock out ohai data" 11 | spec.summary = "Fauxhai provides an easy way to mock out your ohai data for testing with chefspec!" 12 | spec.homepage = "https://github.com/chefspec/fauxhai" 13 | spec.license = "MIT" 14 | 15 | spec.required_ruby_version = ">= 2.3" 16 | 17 | spec.files = %w{LICENSE Gemfile fauxhai-ng.gemspec} + Dir.glob("{lib,bin}/**/*", File::FNM_DOTMATCH).reject { |f| File.directory?(f) } 18 | spec.executables = "fauxhai" 19 | spec.require_paths = ["lib"] 20 | 21 | spec.add_runtime_dependency "net-ssh" 22 | 23 | spec.add_development_dependency "chef", ">= 13.0" 24 | spec.add_development_dependency "ohai", ">= 13.0" 25 | spec.add_development_dependency "rake" 26 | spec.add_development_dependency "rspec", "~> 3.7" 27 | spec.add_development_dependency "rspec-its", "~> 1.2" 28 | end 29 | -------------------------------------------------------------------------------- /lib/fauxhai/runner.rb: -------------------------------------------------------------------------------- 1 | require "ohai" unless defined?(Ohai::System) 2 | require "ohai/plugins/chef" 3 | 4 | module Fauxhai 5 | class Runner 6 | def initialize(args) 7 | @system = Ohai::System.new 8 | @system.all_plugins 9 | 10 | case @system.data["platform"] 11 | when "windows", :windows 12 | require_relative "runner/windows" 13 | singleton_class.send :include, ::Fauxhai::Runner::Windows 14 | else 15 | require_relative "runner/default" 16 | singleton_class.send :include, ::Fauxhai::Runner::Default 17 | end 18 | 19 | result = @system.data.dup.delete_if { |k, v| !whitelist_attributes.include?(k) }.merge( 20 | "languages" => languages, 21 | "counters" => counters, 22 | "current_user" => current_user, 23 | "domain" => domain, 24 | "hostname" => hostname, 25 | "machinename" => hostname, 26 | "fqdn" => fqdn, 27 | "ipaddress" => ipaddress, 28 | "keys" => keys, 29 | "macaddress" => macaddress, 30 | "network" => network, 31 | "uptime" => uptime, 32 | "uptime_seconds" => uptime_seconds, 33 | "idle" => uptime, 34 | "idletime_seconds" => uptime_seconds, 35 | "cpu" => cpu, 36 | "memory" => memory, 37 | "virtualization" => virtualization, 38 | "time" => time 39 | ) 40 | 41 | require "json" unless defined?(JSON) 42 | puts JSON.pretty_generate(result.sort.to_h) 43 | end 44 | end 45 | end 46 | -------------------------------------------------------------------------------- /examples/chefspec.md: -------------------------------------------------------------------------------- 1 | Fauxhai ChefSpec Examples 2 | ========================= 3 | 4 | Mocking a Box 5 | ------------- 6 | ```ruby 7 | require 'chefspec' 8 | 9 | describe 'awesome_cookbook::default' do 10 | before do 11 | Fauxhai.mock(platform:'ubuntu', version:'12.04') 12 | end 13 | end 14 | ``` 15 | 16 | Mocking a Box with a Custom Ruby Version 17 | ---------------------------------------- 18 | ```ruby 19 | require 'chefspec' 20 | 21 | describe 'awesome_cookbook::default' do 22 | before do 23 | Fauxhai.mock(platform:'ubuntu', version:'12.04') do |node| 24 | node['languages']['ruby']['version'] = 'ree' 25 | end 26 | end 27 | end 28 | ``` 29 | 30 | Mocking a Box with Custom Hostname 31 | ---------------------------------- 32 | ```ruby 33 | require 'chefspec' 34 | 35 | describe 'awesome_cookbook::default' do 36 | before do 37 | Fauxhai.mock(platform:'ubuntu', version:'12.04') do |node| 38 | node['hostname'] = 'server01.example.com' 39 | end 40 | end 41 | end 42 | ``` 43 | 44 | Fetching a Remote Box 45 | --------------------- 46 | ```ruby 47 | require 'chefspec' 48 | 49 | describe 'awesome_cookbook::default' do 50 | before do 51 | Fauxhai.fetch(host:'server01.example.com') 52 | end 53 | end 54 | ``` 55 | 56 | Fetching a Remote Box with custom Ruby Version 57 | ---------------------------------------------- 58 | ```ruby 59 | require 'chefspec' 60 | 61 | describe 'awesome_cookbook::default' do 62 | before do 63 | Fauxhai.fetch(host:'server01.example.com') do |node| 64 | node['languages']['ruby']['version'] = 'ree' 65 | end 66 | end 67 | end 68 | ``` 69 | -------------------------------------------------------------------------------- /examples/rspec-chef.md: -------------------------------------------------------------------------------- 1 | Fauxhai Rspec-Chef Examples 2 | =========================== 3 | 4 | Mocking a Box 5 | ------------- 6 | ```ruby 7 | describe 'foo::bar' do 8 | let(:json_attributes) { Fauxhai.mock(platform:'ubuntu', version:'12.04') } 9 | end 10 | ``` 11 | 12 | Or as a default 13 | ```ruby 14 | # spec/spec_helper.rb 15 | RSpec.configure do |c| 16 | c.json_attributes = Fauxhai.mock(platform:'ubuntu', version:'12.04') 17 | end 18 | ``` 19 | 20 | Mocking a Box with a Custom Ruby Version 21 | ---------------------------------------- 22 | ```ruby 23 | describe 'foo::bar' do 24 | let(:json_attributes) do 25 | Fauxhai.mock(platform:'ubuntu', version:'12.04') do |node| 26 | node['languages']['ruby']['version'] = 'ree' 27 | end 28 | end 29 | end 30 | ``` 31 | 32 | Mocking a Box with Custom Hostname 33 | ---------------------------------- 34 | ```ruby 35 | describe 'foo::bar' do 36 | let(:json_attributes) do 37 | Fauxhai.mock(platform:'ubuntu', version:'12.04') do |node| 38 | node['hostname'] = 'server01.example.com' 39 | end 40 | end 41 | end 42 | ``` 43 | 44 | Fetching a Remote Box 45 | --------------------- 46 | ```ruby 47 | describe 'foo::bar' do 48 | let(:json_attributes) { Fauxhai.fetch(host:'server01.example.com' } 49 | end 50 | ``` 51 | 52 | Fetching a Remote Box with custom Ruby Version 53 | ---------------------------------------------- 54 | ```ruby 55 | describe 'foo::bar' do 56 | let(:json_attributes) do 57 | Fauxhai.fetch(host:'server01.example.com') do |node| 58 | node['languages']['ruby']['version'] = 'ree' 59 | end 60 | end 61 | end 62 | ``` 63 | -------------------------------------------------------------------------------- /PLATFORMS.md: -------------------------------------------------------------------------------- 1 | ## Fauxhai Platforms 2 | 3 | This file lists each platform known to Fauxhai and the available versions for each of those platforms. See the ChefSpec documentation for mocking out platforms and platform versions within ChefSpec. 4 | 5 | ### aix 6 | 7 | - 7.1 8 | - 7.2 9 | 10 | ### almalinux 11 | 12 | - 8 13 | 14 | ### amazon 15 | 16 | - 2 17 | - 2018.03 (deprecated) 18 | 19 | ### arch 20 | 21 | - 4.10.13-1-ARCH 22 | 23 | ### centos 24 | 25 | - 6.10 26 | - 7.7.1908 (deprecated) 27 | - 7.8.2003 28 | - 8 29 | 30 | ### clearos 31 | 32 | - 7.4 33 | 34 | ### debian 35 | 36 | - 9.11 (deprecated) 37 | - 9.12 38 | - 9.13 39 | - 10 40 | - 11 41 | 42 | ### dragonfly4 43 | 44 | - 4.8-RELEASE 45 | 46 | ### fedora 47 | 48 | - 31 (deprecated) 49 | - 32 50 | 51 | ### freebsd 52 | 53 | - 11.2 (deprecated) 54 | - 12.1 55 | 56 | ### gentoo 57 | 58 | - 4.9.95-gentoo 59 | 60 | ### linuxmint 61 | 62 | - 19.0 63 | 64 | ### mac_os_x 65 | 66 | - 10.14 67 | - 10.15 68 | - 11.0 (deprecated) 69 | - 11 70 | - 12 71 | 72 | ### openbsd 73 | 74 | - 6.2 75 | 76 | ### opensuse 77 | 78 | - 15.2 79 | 80 | ### oracle 81 | 82 | - 6.10 83 | - 7.5 (deprecated) 84 | - 7.6 85 | 86 | ### raspbian 87 | 88 | - 10 89 | 90 | ### redhat 91 | 92 | - 6.10 93 | - 7.7 (deprecated) 94 | - 7.8 95 | - 7.9 96 | - 8 97 | 98 | ### rocky 99 | 100 | - 8 101 | 102 | ### smartos 103 | 104 | - 5.11 (deprecated) 105 | 106 | ### solaris2 107 | 108 | - 5.11 109 | 110 | ### suse 111 | 112 | - 12.4 113 | - 12.5 114 | - 15 115 | 116 | ### ubuntu 117 | 118 | - 16.04 119 | - 18.04 120 | - 20.04 121 | 122 | ### windows 123 | 124 | - 10 125 | - 2012 126 | - 2012R2 127 | - 2016 128 | - 2019 129 | - 8.1 130 | -------------------------------------------------------------------------------- /lib/fauxhai/keys/id_rsa: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIEpAIBAAKCAQEArSwnqraq/x25zkXJMNbpHS4aXxqDjxYuf3rChKJM06qtYLIE 3 | NlfHppso36tYul130bUgcZHZR7/xlnT+cAU7hNhvOTMwZFUkD75sEDfJV/yTDxBL 4 | Sl5HjqNKPdvz4kpr2OHkbHRdJsONFL4O47RN3938Y+Pe5M4eXyrZKx5xeMfYFwm1 5 | Xa9xalyX4IEeSCcAMU6Hq2yu8f7kUvu2LmSPT4qd7bdeJ7/Xs8F3Lhm/7b41jmSD 6 | YhZfIs1SBSou7MX019PaeDYGpsUUu0w9mHdI0/JxKBfVGU7IF3CdZA0sezezcRXz 7 | Xz+qwnThkUc+IFIV7bFIxv15MT3gsGewPVZzgwIDAQABAoIBAHgnSt6IH90jIuic 8 | QxxAAT7d3i5elymQmnKZGp4sfmHe6q1M1t9dyIkw3wtSOB4W/CvlIL2sFLZT16wt 9 | QN04xDNIeOOXQNxctsi1twUJsAn8lYy+IX9YKw4s/jYthupb+LhjA7q8gmWDCUB7 10 | HpmfYOkTfStR0DWxTiF5+XSRiunhmz0qidpAA0Rv8Fz5B1PL7zI0yyV1oJwVATc8 11 | f1wEl53TDel+udwJ5rnWihiJMehLqsAa68WkQIOig77Logrz+WybMQYpF3D3SqRL 12 | cx0vc2cStbvnpcuG8UtAz61fi029rkWmAj6sa7BSgngFXphCezZ9dFDBtahc+Kzw 13 | ncMsyAECgYEA0++mKDq2oMN+i7Nc1VcvmfwxtkWMK6y+qusVpEhJB/u6E0Adxdxa 14 | wHuRhiD623lGHduzHxO8GqSKAFSR5KDOwcDFduiq/K9f2rHJE4eL3BHnm28/0T0e 15 | 2VGYXebs4IPxuGjpNOAWPw/jo0tMSU+xr7ajELi3PU5DAD1SUiHJWaECgYEA0S1N 16 | LC+1Fz9ZsmL0hQpwoGhvKeLmbHinSbskovczMtI5JUU4HLzfCjovMuct93PxOsMO 17 | Gsy7J/v+dVpk8P4x58g2ZYjpF98r9lLkIs+wa7r7XAkHBqJ3SrrA2z4qm1bijr15 18 | /HGRT8q33umESYBFfdrbiN2CMHrs/72dgSBbIqMCgYEAtN5e1RJWbZipVJv76+3+ 19 | J9H8sutjlppUFhWOYKd3/CIuSON9BTDrGj3akbdvnwI+fpjSowD6lVo6k9GYuJ8s 20 | FFppqvMhiYg5q6/yRIJ3L5bwK8yjj/QzcY+bEvhSy8CO96xA6ekb0zHCOce3ERG8 21 | OJMLUufxKZayw2+R45oF9kECgYEAsn3Yk3LmMT8ymADOrFP7RTW4XeKrQzY1cboK 22 | ijEsdBpk/wOw3PzhygVaTzJry/MYjk7xUzcOIRFr0dHfvrD5/tGecUfBt0gNaHTV 23 | DUtyPItif+eIIkYySwdPGAZVLxaV3r2aQSrbl13hRoq3Ak09fyZpHMH/nMTYRWYU 24 | 56GngscCgYB3/vF1j+fxoqjhecMuhxNB3KDxuj3kW6ZBFC1yI3tsiHU+cTDBzdlG 25 | fANBAUvFxMyd7FV8DxRKsfv+YX4U3oET2SB5xxVyZZ5km+X4nWdzJdEXl2JNiBCr 26 | yDsMDWkmavqDJTZkngJnQ43pwdEOZlv8ePLj453YcVGACziizDlsyw== 27 | -----END RSA PRIVATE KEY----- 28 | -------------------------------------------------------------------------------- /lib/fauxhai/fetcher.rb: -------------------------------------------------------------------------------- 1 | require "digest/sha1" 2 | require "json" unless defined?(JSON) 3 | 4 | module Fauxhai 5 | class Fetcher 6 | def initialize(options = {}, &override_attributes) 7 | @options = options 8 | 9 | if !force_cache_miss? && cached? 10 | @data = cache 11 | else 12 | require "net/ssh" unless defined?(Net::SSH) 13 | Net::SSH.start(host, user, @options) do |ssh| 14 | @data = JSON.parse(ssh.exec!("ohai")) 15 | end 16 | 17 | # cache this data so we do not have to SSH again 18 | File.open(cache_file, "w+") { |f| f.write(@data.to_json) } 19 | end 20 | 21 | yield(@data) if block_given? 22 | 23 | if defined?(ChefSpec) 24 | data = @data 25 | ::ChefSpec::Runner.send :define_method, :fake_ohai do |ohai| 26 | data.each_pair do |attribute, value| 27 | ohai[attribute] = value 28 | end 29 | end 30 | end 31 | 32 | @data 33 | end 34 | 35 | def cache 36 | @cache ||= JSON.parse(File.read(cache_file)) 37 | end 38 | 39 | def cached? 40 | File.exist?(cache_file) 41 | end 42 | 43 | def cache_key 44 | Digest::SHA2.hexdigest("#{user}@#{host}") 45 | end 46 | 47 | def cache_file 48 | File.expand_path(File.join(Fauxhai.root, "tmp", cache_key)) 49 | end 50 | 51 | def force_cache_miss? 52 | @force_cache_miss ||= @options.delete(:force_cache_miss) || false 53 | end 54 | 55 | # Return the given `@data` attribute as a Ruby hash instead of a JSON object 56 | # 57 | # @return [Hash] the `@data` represented as a Ruby hash 58 | def to_hash(*args) 59 | @data.to_hash(*args) 60 | end 61 | 62 | def to_s 63 | "#" 64 | end 65 | 66 | private 67 | 68 | def host 69 | @host ||= begin 70 | raise ArgumentError, ":host is a required option for Fauxhai.fetch" unless @options[:host] 71 | 72 | @options.delete(:host) 73 | end 74 | end 75 | 76 | def user 77 | @user ||= (@options.delete(:user) || ENV["USER"] || ENV["USERNAME"]).chomp 78 | end 79 | end 80 | end 81 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Fauxhai 2 | 3 | Fauxhai is community-maintained and updated. Aside from the initial files, all of the ohai system mocks have been created by the community. If you have a system that you think would benefit the community, here's how you get it into [fauxhai](https://github.com/chefspec/fauxhai): 4 | 5 | 1. Build a system to your liking (on a virtual machine, for example) 6 | 2. Install chef, ohai, and fauxhai 7 | 3. Run the following at the command line: 8 | 9 | Unix: 10 | 11 | ``` 12 | sudo fauxhai > /tmp/fauxhai.json 13 | ``` 14 | 15 | Windows (in Administrator mode): 16 | 17 | ``` 18 | fauxhai > C:\SomePath\fauxhai.json 19 | ``` 20 | 21 | 4. This will create a file `fauxhai.json` at the specified path. As with any tool, inspect the contents of the file before continuing 22 | 23 | 5. Copy the contents of this file to your local development machine (using scp or sftp, for example) 24 | 6. Fork, clone and `bundle`: 25 | 26 | ``` 27 | git clone https://github.com//fauxhai.git 28 | cd fauxhai 29 | bundle 30 | ``` 31 | 32 | 7. Create a new branch named `add_[platform]_[version]` (e.g. `add_ubuntu_12_04`) without dashes and dots replaced with underscores. Be sure to use the official version number, not a package name (e.g. '12_04', not 'precise') if available: 33 | 34 | ``` 35 | Ubuntu Precise, 12.04 add_ubuntu_12_04 36 | Ubuntu Lucid, 10.04 add_ubuntu_10_04 37 | OSX Lion, 10.7.4 add_osx_10_7_4 38 | Windows XP add_windows_xp 39 | ``` 40 | 41 | **Q:** Is there a reason for this super-specific naming convention? 42 | 43 | **A:** No, but it helps in tracking problems and analyzing pull requests. Ultimately it just ensures your pull request is merged as quickly as possible 44 | 45 | 8. Create a new json file in `lib/fauxhai/platforms/[os]/[version].json` (e.g. `lib/fauxhai/platforms/ubuntu/12.04.json`) 46 | 47 | 9. Copy-paste the contents of the file from `Step 4` into this file and save 48 | 10. Verify the installation was successful by doing the following: 49 | 50 | ``` 51 | bundle console 52 | Fauxhai.mock(platform: '[os]', version: '[version]') # e.g. Fauxhai.mock(platform: 'ubuntu', version: '12.04') 53 | ``` 54 | 55 | As long as that does not throw an error, you're good to go! 56 | 57 | 11. Submit a pull request on github 58 | 59 | **Note:** I do _not_ need to release a new version of Fauxhai for your changes to be pulled and used. Unless you are updating an existing platform, Fauxhai will automatically pull new versions from GitHub via HTTP and cache them. 60 | -------------------------------------------------------------------------------- /spec/mocker_spec.rb: -------------------------------------------------------------------------------- 1 | require "spec_helper" 2 | 3 | describe Fauxhai::Mocker do 4 | describe "#data" do 5 | let(:options) { {} } 6 | subject { described_class.new({ github_fetching: false }.merge(options)).data } 7 | 8 | context "with a platform and version" do 9 | let(:options) { { platform: "chefspec", version: "0.6.1" } } 10 | its(["hostname"]) { is_expected.to eq "chefspec" } 11 | end 12 | 13 | context "with a Windows platform and version" do 14 | let(:options) { { platform: "windows", version: "10" } } 15 | its(["hostname"]) { is_expected.to eq "Fauxhai" } 16 | end 17 | end 18 | 19 | describe "#version" do 20 | let(:options) { {} } 21 | subject { described_class.new({ github_fetching: false }.merge(options)).send(:version) } 22 | 23 | context "with a platform and version" do 24 | let(:options) { { platform: "chefspec", version: "0.6.1" } } 25 | it { is_expected.to eq "0.6.1" } 26 | end 27 | 28 | context "with a platform and no version" do 29 | let(:options) { { platform: "chefspec" } } 30 | it { is_expected.to eq "0.6.1" } 31 | end 32 | 33 | context "with a platform and a blank version" do 34 | let(:options) { { platform: "chefspec", version: "" } } 35 | it { is_expected.to eq "0.6.1" } 36 | end 37 | 38 | context "with a platform and a partial version" do 39 | let(:options) { { platform: "chefspec", version: "0.6" } } 40 | it { is_expected.to eq "0.6.1" } 41 | end 42 | 43 | context "with a platform and a non-matching partial version" do 44 | let(:options) { { platform: "chefspec", version: "0.7" } } 45 | it { is_expected.to eq "0.7" } 46 | end 47 | 48 | context "with a Windows platform and no version" do 49 | let(:options) { { platform: "windows" } } 50 | it { is_expected.to eq "2019" } 51 | end 52 | 53 | context "with a Windows platform and an exact partial version" do 54 | let(:options) { { platform: "windows", version: "2012" } } 55 | it { is_expected.to eq "2012" } 56 | end 57 | 58 | context "with a CentOS platform and a partial version" do 59 | let(:options) { { platform: "centos", version: "6" } } 60 | it { is_expected.to eq "6.10" } 61 | end 62 | 63 | context "with a platform and an invalid version" do 64 | let(:options) { { platform: "chefspec", version: "99" } } 65 | it { is_expected.to eq "99" } 66 | end 67 | 68 | context "with an invalid platform and an invalid version" do 69 | let(:options) { { platform: "notthere", version: "99" } } 70 | it { is_expected.to eq "99" } 71 | end 72 | end 73 | end 74 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env rake 2 | require "bundler/gem_tasks" 3 | require "json" 4 | 5 | task default: ["validate:json", "spec"] 6 | 7 | namespace :validate do 8 | desc "Validate mock platform data is valid JSON" 9 | task :json do 10 | failure = false 11 | Dir.glob("./lib/fauxhai/platforms/**/*.json") do |file| 12 | begin 13 | JSON.parse(File.read(file)) 14 | rescue JSON::ParserError 15 | failure = true 16 | puts "Failed to parse #{file}." 17 | end 18 | end 19 | exit! if failure 20 | puts "JSON files validated" 21 | end 22 | end 23 | 24 | namespace :documentation do 25 | desc "Update the PLATFORMS.md file with a list of all platforms" 26 | task update_platforms: :update_json_list do 27 | File.delete("PLATFORMS.md") if File.exist?("PLATFORMS.md") 28 | f = File.new("PLATFORMS.md", "w") 29 | f.write "## Fauxhai Platforms\n\nThis file lists each platform known to Fauxhai and the available versions for each of those platforms. See the ChefSpec documentation for mocking out platforms and platform versions within ChefSpec.\n" 30 | 31 | JSON.parse(File.read("platforms.json")).each do |plat, versions| 32 | f.write "\n### #{plat}\n\n" 33 | versions.each { |ver, data| f.write "- #{ver}#{" (deprecated)" if data["deprecated"]}\n" } 34 | end 35 | f.close 36 | end 37 | end 38 | 39 | desc "Update the platforms.json data file used when a platform can't be found locally" 40 | task :update_json_list do 41 | # get a sorted list of platforms from files in the platforms dir 42 | # but skip any hidden files and skip the fake chefspec platform 43 | plats = Dir.children("./lib/fauxhai/platforms/").sort 44 | .grep_v(/(^\.|chefspec)/) 45 | .to_h { |v| [v, {}] } 46 | 47 | # add version, deprecated status, and file path to each platform 48 | plats.each_key do |plat| 49 | ver_data = Dir.glob(File.join("lib/fauxhai/platforms/", plat, "**.json")) 50 | 51 | # we can't properly sort windows versions 52 | # but this is a quick and dirty sort that's better than nothing 53 | ver_data = if plat == "windows" 54 | ver_data.sort 55 | else 56 | ver_data.sort_by { |x| Gem::Version.new(File.basename(x, ".json")) } 57 | end 58 | 59 | ver_data.each do |version_path| 60 | data = JSON.parse(File.read(version_path)) 61 | ver = File.basename(version_path, ".json") 62 | plats[plat][ver] = {} 63 | plats[plat][ver]["deprecated"] = !!data["deprecated"] 64 | plats[plat][ver]["path"] = version_path 65 | end 66 | end 67 | 68 | File.write("platforms.json", JSON.pretty_generate(plats)) 69 | end 70 | 71 | require "rspec/core/rake_task" 72 | RSpec::Core::RakeTask.new(:spec) 73 | -------------------------------------------------------------------------------- /lib/fauxhai/runner/windows.rb: -------------------------------------------------------------------------------- 1 | module Fauxhai 2 | class Runner 3 | module Windows 4 | require_relative "default" 5 | include ::Fauxhai::Runner::Default 6 | 7 | def default_interface 8 | "0xe" 9 | end 10 | 11 | def network 12 | { 13 | "interfaces" => { 14 | "#{default_interface}" => { 15 | "configuration" => { 16 | "caption" => "[00000012] Ethernet Adapter", 17 | "database_path" => '%SystemRoot%\\System32\\drivers\\etc', 18 | "default_ip_gateway" => %w{default_gateway}, 19 | "description" => "Ethernet Adapter", 20 | "dhcp_enabled" => false, 21 | "dns_domain_suffix_search_order" => [], 22 | "dns_enabled_for_wins_resolution" => false, 23 | "dns_host_name" => hostname, 24 | "domain_dns_registration_enabled" => false, 25 | "full_dns_registration_enabled" => true, 26 | "gateway_cost_metric" => [0], 27 | "index" => 12, 28 | "interface_index" => 14, 29 | "ip_address" => [ipaddress], 30 | "ip_connection_metric" => 5, 31 | "ip_enabled" => true, 32 | "ip_filter_security_enabled" => false, 33 | "ip_sec_permit_ip_protocols" => [], 34 | "ip_sec_permit_tcp_ports" => [], 35 | "ip_sec_permit_udp_ports" => [], 36 | "ip_subnet" => %w{255.255.255.0 64}, 37 | "mac_address" => macaddress, 38 | "service_name" => "netkvm", 39 | "setting_id" => "{00000000-0000-0000-0000-000000000000}", 40 | "tcpip_netbios_options" => 0, 41 | "tcp_window_size" => 64240, 42 | "wins_enable_lm_hosts_lookup" => true, 43 | "wins_scope_id" => "", 44 | }, 45 | "instance" => { 46 | "adapter_type" => "Ethernet 802.3", 47 | "adapter_type_id" => 0, 48 | "availability" => 3, 49 | "caption" => "[00000012] Ethernet Adapter", 50 | "config_manager_error_code" => 0, 51 | "config_manager_user_config" => false, 52 | "creation_class_name" => "Win32_NetworkAdapter", 53 | "description" => "Ethernet Adapter", 54 | "device_id" => "12", 55 | "guid" => "{00000000-0000-0000-0000-000000000000}", 56 | "index" => 12, 57 | "installed" => true, 58 | "interface_index" => 14, 59 | "mac_address" => macaddress, 60 | "manufacturer" => "", 61 | "max_number_controlled" => 0, 62 | "name" => "Ethernet Adapter", 63 | "net_connection_id" => "Ethernet", 64 | "net_connection_status" => 2, 65 | "net_enabled" => true, 66 | "physical_adapter" => true, 67 | "pnp_device_id" => 'PCI\\VEN_0000&DEV_0000&SUBSYS_000000000&REV_00\\0&0000000000&00', 68 | "power_management_supported" => false, 69 | "product_name" => "Ethernet Adapter", 70 | "service_name" => "netkvm", 71 | "speed" => "10000000000", 72 | "system_creation_class_name" => "Win32_ComputerSystem", 73 | "system_name" => hostname, 74 | "time_of_last_reset" => "20000101000001.000000+000", 75 | }, 76 | "counters" => {}, 77 | "addresses" => { 78 | "#{ipaddress}" => { 79 | "prefixlen" => "24", 80 | "netmask" => "255.255.255.0", 81 | "broadcast" => "10.0.0.255", 82 | "family" => "inet", 83 | }, 84 | "#{macaddress}" => { 85 | "family" => "lladdr", 86 | }, 87 | }, 88 | "type" => "Ethernet 802.3", 89 | "arp" => { 90 | "10.0.0.1" => "fe:ff:ff:ff:ff:ff", 91 | }, 92 | "encapsulation" => "Ethernet", 93 | }, 94 | }, 95 | "default_gateway" => default_gateway, 96 | "default_interface" => default_interface, 97 | } 98 | end 99 | end 100 | end 101 | end 102 | -------------------------------------------------------------------------------- /lib/fauxhai/mocker.rb: -------------------------------------------------------------------------------- 1 | require "json" unless defined?(JSON) 2 | require "pathname" unless defined?(Pathname) 3 | 4 | module Fauxhai 5 | class Mocker 6 | # The base URL for the GitHub project (raw) 7 | RAW_BASE = "https://raw.githubusercontent.com/chefspec/fauxhai/master".freeze 8 | 9 | # A message about where to find a list of platforms 10 | PLATFORM_LIST_MESSAGE = "A list of available platforms is available at https://github.com/chefspec/fauxhai/blob/master/PLATFORMS.md".freeze 11 | 12 | # Create a new Ohai Mock with fauxhai. 13 | # 14 | # @param [Hash] options 15 | # the options for the mocker 16 | # @option options [String] :platform 17 | # the platform to mock 18 | # @option options [String] :version 19 | # the version of the platform to mock 20 | # @option options [String] :path 21 | # the path to a local JSON file 22 | # @option options [Bool] :github_fetching 23 | # whether to try loading from Github 24 | def initialize(options = {}, &override_attributes) 25 | @options = { github_fetching: true }.merge(options) 26 | 27 | yield(data) if block_given? 28 | end 29 | 30 | def data 31 | @fauxhai_data ||= lambda do 32 | # If a path option was specified, use it 33 | if @options[:path] 34 | filepath = File.expand_path(@options[:path]) 35 | 36 | unless File.exist?(filepath) 37 | raise Fauxhai::Exception::InvalidPlatform.new("You specified a path to a JSON file on the local system that does not exist: '#{filepath}'") 38 | end 39 | else 40 | filepath = File.join(platform_path, "#{version}.json") 41 | end 42 | 43 | if File.exist?(filepath) 44 | parse_and_validate(File.read(filepath)) 45 | elsif @options[:github_fetching] 46 | # Try loading from github (in case someone submitted a PR with a new file, but we haven't 47 | # yet updated the gem version). Cache the response locally so it's faster next time. 48 | require "open-uri" unless defined?(OpenURI) 49 | begin 50 | response = URI.open("#{RAW_BASE}/lib/fauxhai/platforms/#{platform}/#{version}.json") 51 | rescue OpenURI::HTTPError 52 | raise Fauxhai::Exception::InvalidPlatform.new("Could not find platform '#{platform}/#{version}' on the local disk and an HTTP error was encountered when fetching from Github. #{PLATFORM_LIST_MESSAGE}") 53 | end 54 | 55 | if response.status.first.to_i == 200 56 | response_body = response.read 57 | path = Pathname.new(filepath) 58 | FileUtils.mkdir_p(path.dirname) 59 | 60 | begin 61 | File.open(filepath, "w") { |f| f.write(response_body) } 62 | rescue Errno::EACCES # a pretty common problem in CI systems 63 | puts "Fetched '#{platform}/#{version}' from GitHub, but could not write to the local path: #{filepath}. Fix the local file permissions to avoid downloading this file every run." 64 | end 65 | return parse_and_validate(response_body) 66 | else 67 | raise Fauxhai::Exception::InvalidPlatform.new("Could not find platform '#{platform}/#{version}' on the local disk and an Github fetching returned http error code #{response.status.first.to_i}! #{PLATFORM_LIST_MESSAGE}") 68 | end 69 | else 70 | raise Fauxhai::Exception::InvalidPlatform.new("Could not find platform '#{platform}/#{version}' on the local disk and Github fetching is disabled! #{PLATFORM_LIST_MESSAGE}") 71 | end 72 | end.call 73 | end 74 | 75 | private 76 | 77 | # As major releases of Ohai ship it's difficult and sometimes impossible 78 | # to regenerate all fauxhai data. This allows us to deprecate old releases 79 | # and eventually remove them while giving end users ample warning. 80 | def parse_and_validate(unparsed_data) 81 | parsed_data = JSON.parse(unparsed_data) 82 | if parsed_data["deprecated"] 83 | STDERR.puts "WARNING: Fauxhai platform data for #{parsed_data["platform"]} #{parsed_data["platform_version"]} is deprecated and will be removed in the 10.0 release 3/2022. #{PLATFORM_LIST_MESSAGE}" 84 | end 85 | parsed_data 86 | end 87 | 88 | def platform 89 | @options[:platform] ||= begin 90 | STDERR.puts "WARNING: you must specify a 'platform' and optionally a 'version' for your ChefSpec Runner and/or Fauxhai constructor, in the future omitting the platform will become a hard error. #{PLATFORM_LIST_MESSAGE}" 91 | "chefspec" 92 | end 93 | end 94 | 95 | def platform_path 96 | File.join(Fauxhai.root, "lib", "fauxhai", "platforms", platform) 97 | end 98 | 99 | def version 100 | @version ||= begin 101 | if File.exist?("#{platform_path}/#{@options[:version]}.json") 102 | # Whole version, use it as-is. 103 | @options[:version] 104 | else 105 | # Check if it's a prefix of an existing version. 106 | versions = Dir["#{platform_path}/*.json"].map { |path| File.basename(path, ".json") } 107 | unless @options[:version].to_s == "" 108 | # If the provided version is nil or '', that means take anything, 109 | # otherwise run the prefix match with an extra \D to avoid the 110 | # case where "7.1" matches "7.10.0". 111 | prefix_re = /^#{Regexp.escape(@options[:version])}\D/ 112 | versions.select! { |ver| ver =~ prefix_re } 113 | end 114 | 115 | if versions.empty? 116 | # No versions available, either an unknown platform or nothing matched 117 | # the prefix check. Pass through the option as given so we can try 118 | # github fetching. 119 | @options[:version] 120 | else 121 | # Take the highest version available, trying to use rules that should 122 | # probably mostly work on all OSes. Famous last words. The idea of 123 | # the regex is to split on any punctuation (the common case) and 124 | # also any single letter with digit on either side (2012r2). This 125 | # leaves any long runs of letters intact (4.2-RELEASE). Then convert 126 | # any run of digits to an integer to get version-ish comparison. 127 | # This is basically a more flexible version of Gem::Version. 128 | versions.max_by do |ver| 129 | ver.split(/[^a-z0-9]|(?<=\d)[a-z](?=\d)/i).map do |part| 130 | if part =~ /^\d+$/ 131 | part.to_i 132 | else 133 | part 134 | end 135 | end 136 | end 137 | end 138 | end 139 | end 140 | end 141 | 142 | end 143 | end 144 | -------------------------------------------------------------------------------- /platforms.json: -------------------------------------------------------------------------------- 1 | { 2 | "aix": { 3 | "7.1": { 4 | "deprecated": false, 5 | "path": "lib/fauxhai/platforms/aix/7.1.json" 6 | }, 7 | "7.2": { 8 | "deprecated": false, 9 | "path": "lib/fauxhai/platforms/aix/7.2.json" 10 | } 11 | }, 12 | "almalinux": { 13 | "8": { 14 | "deprecated": false, 15 | "path": "lib/fauxhai/platforms/almalinux/8.json" 16 | } 17 | }, 18 | "amazon": { 19 | "2": { 20 | "deprecated": false, 21 | "path": "lib/fauxhai/platforms/amazon/2.json" 22 | }, 23 | "2018.03": { 24 | "deprecated": true, 25 | "path": "lib/fauxhai/platforms/amazon/2018.03.json" 26 | } 27 | }, 28 | "arch": { 29 | "4.10.13-1-ARCH": { 30 | "deprecated": false, 31 | "path": "lib/fauxhai/platforms/arch/4.10.13-1-ARCH.json" 32 | } 33 | }, 34 | "centos": { 35 | "6.10": { 36 | "deprecated": false, 37 | "path": "lib/fauxhai/platforms/centos/6.10.json" 38 | }, 39 | "7.7.1908": { 40 | "deprecated": true, 41 | "path": "lib/fauxhai/platforms/centos/7.7.1908.json" 42 | }, 43 | "7.8.2003": { 44 | "deprecated": false, 45 | "path": "lib/fauxhai/platforms/centos/7.8.2003.json" 46 | }, 47 | "8": { 48 | "deprecated": false, 49 | "path": "lib/fauxhai/platforms/centos/8.json" 50 | } 51 | }, 52 | "clearos": { 53 | "7.4": { 54 | "deprecated": false, 55 | "path": "lib/fauxhai/platforms/clearos/7.4.json" 56 | } 57 | }, 58 | "debian": { 59 | "9.11": { 60 | "deprecated": true, 61 | "path": "lib/fauxhai/platforms/debian/9.11.json" 62 | }, 63 | "9.12": { 64 | "deprecated": false, 65 | "path": "lib/fauxhai/platforms/debian/9.12.json" 66 | }, 67 | "9.13": { 68 | "deprecated": false, 69 | "path": "lib/fauxhai/platforms/debian/9.13.json" 70 | }, 71 | "10": { 72 | "deprecated": false, 73 | "path": "lib/fauxhai/platforms/debian/10.json" 74 | }, 75 | "11": { 76 | "deprecated": false, 77 | "path": "lib/fauxhai/platforms/debian/11.json" 78 | } 79 | }, 80 | "dragonfly4": { 81 | "4.8-RELEASE": { 82 | "deprecated": false, 83 | "path": "lib/fauxhai/platforms/dragonfly4/4.8-RELEASE.json" 84 | } 85 | }, 86 | "fedora": { 87 | "31": { 88 | "deprecated": true, 89 | "path": "lib/fauxhai/platforms/fedora/31.json" 90 | }, 91 | "32": { 92 | "deprecated": false, 93 | "path": "lib/fauxhai/platforms/fedora/32.json" 94 | } 95 | }, 96 | "freebsd": { 97 | "11.2": { 98 | "deprecated": true, 99 | "path": "lib/fauxhai/platforms/freebsd/11.2.json" 100 | }, 101 | "12.1": { 102 | "deprecated": false, 103 | "path": "lib/fauxhai/platforms/freebsd/12.1.json" 104 | } 105 | }, 106 | "gentoo": { 107 | "4.9.95-gentoo": { 108 | "deprecated": false, 109 | "path": "lib/fauxhai/platforms/gentoo/4.9.95-gentoo.json" 110 | } 111 | }, 112 | "linuxmint": { 113 | "19.0": { 114 | "deprecated": false, 115 | "path": "lib/fauxhai/platforms/linuxmint/19.0.json" 116 | } 117 | }, 118 | "mac_os_x": { 119 | "10.14": { 120 | "deprecated": false, 121 | "path": "lib/fauxhai/platforms/mac_os_x/10.14.json" 122 | }, 123 | "10.15": { 124 | "deprecated": false, 125 | "path": "lib/fauxhai/platforms/mac_os_x/10.15.json" 126 | }, 127 | "11.0": { 128 | "deprecated": true, 129 | "path": "lib/fauxhai/platforms/mac_os_x/11.0.json" 130 | }, 131 | "11": { 132 | "deprecated": false, 133 | "path": "lib/fauxhai/platforms/mac_os_x/11.json" 134 | }, 135 | "12": { 136 | "deprecated": false, 137 | "path": "lib/fauxhai/platforms/mac_os_x/12.json" 138 | } 139 | }, 140 | "openbsd": { 141 | "6.2": { 142 | "deprecated": false, 143 | "path": "lib/fauxhai/platforms/openbsd/6.2.json" 144 | } 145 | }, 146 | "opensuse": { 147 | "15.2": { 148 | "deprecated": false, 149 | "path": "lib/fauxhai/platforms/opensuse/15.2.json" 150 | } 151 | }, 152 | "oracle": { 153 | "6.10": { 154 | "deprecated": false, 155 | "path": "lib/fauxhai/platforms/oracle/6.10.json" 156 | }, 157 | "7.5": { 158 | "deprecated": true, 159 | "path": "lib/fauxhai/platforms/oracle/7.5.json" 160 | }, 161 | "7.6": { 162 | "deprecated": false, 163 | "path": "lib/fauxhai/platforms/oracle/7.6.json" 164 | } 165 | }, 166 | "raspbian": { 167 | "10": { 168 | "deprecated": false, 169 | "path": "lib/fauxhai/platforms/raspbian/10.json" 170 | } 171 | }, 172 | "redhat": { 173 | "6.10": { 174 | "deprecated": false, 175 | "path": "lib/fauxhai/platforms/redhat/6.10.json" 176 | }, 177 | "7.7": { 178 | "deprecated": true, 179 | "path": "lib/fauxhai/platforms/redhat/7.7.json" 180 | }, 181 | "7.8": { 182 | "deprecated": false, 183 | "path": "lib/fauxhai/platforms/redhat/7.8.json" 184 | }, 185 | "7.9": { 186 | "deprecated": false, 187 | "path": "lib/fauxhai/platforms/redhat/7.9.json" 188 | }, 189 | "8": { 190 | "deprecated": false, 191 | "path": "lib/fauxhai/platforms/redhat/8.json" 192 | } 193 | }, 194 | "rocky": { 195 | "8": { 196 | "deprecated": false, 197 | "path": "lib/fauxhai/platforms/rocky/8.json" 198 | } 199 | }, 200 | "smartos": { 201 | "5.11": { 202 | "deprecated": true, 203 | "path": "lib/fauxhai/platforms/smartos/5.11.json" 204 | } 205 | }, 206 | "solaris2": { 207 | "5.11": { 208 | "deprecated": false, 209 | "path": "lib/fauxhai/platforms/solaris2/5.11.json" 210 | } 211 | }, 212 | "suse": { 213 | "12.4": { 214 | "deprecated": false, 215 | "path": "lib/fauxhai/platforms/suse/12.4.json" 216 | }, 217 | "12.5": { 218 | "deprecated": false, 219 | "path": "lib/fauxhai/platforms/suse/12.5.json" 220 | }, 221 | "15": { 222 | "deprecated": false, 223 | "path": "lib/fauxhai/platforms/suse/15.json" 224 | } 225 | }, 226 | "ubuntu": { 227 | "16.04": { 228 | "deprecated": false, 229 | "path": "lib/fauxhai/platforms/ubuntu/16.04.json" 230 | }, 231 | "18.04": { 232 | "deprecated": false, 233 | "path": "lib/fauxhai/platforms/ubuntu/18.04.json" 234 | }, 235 | "20.04": { 236 | "deprecated": false, 237 | "path": "lib/fauxhai/platforms/ubuntu/20.04.json" 238 | } 239 | }, 240 | "windows": { 241 | "10": { 242 | "deprecated": false, 243 | "path": "lib/fauxhai/platforms/windows/10.json" 244 | }, 245 | "2012": { 246 | "deprecated": false, 247 | "path": "lib/fauxhai/platforms/windows/2012.json" 248 | }, 249 | "2012R2": { 250 | "deprecated": false, 251 | "path": "lib/fauxhai/platforms/windows/2012R2.json" 252 | }, 253 | "2016": { 254 | "deprecated": false, 255 | "path": "lib/fauxhai/platforms/windows/2016.json" 256 | }, 257 | "2019": { 258 | "deprecated": false, 259 | "path": "lib/fauxhai/platforms/windows/2019.json" 260 | }, 261 | "8.1": { 262 | "deprecated": false, 263 | "path": "lib/fauxhai/platforms/windows/8.1.json" 264 | } 265 | } 266 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Fauxhai-ng 2 | 3 | ![CI](https://github.com/chefspec/fauxhai/workflows/CI/badge.svg) [![Gem Version](https://badge.fury.io/rb/fauxhai-ng.svg)](https://badge.fury.io/rb/fauxhai-ng) 4 | 5 | Note: fauxhai-ng is an updated version of the original fauxhai gem. The CLI and library namespaces have not changed, but you will want to update to use the new gem. 6 | 7 | Fauxhai is a gem for mocking out [ohai](https://github.com/chef/ohai) data in your chef testing. Fauxhai is community supported, so we need **your help** to populate our dataset. Here's an example for testing my "awesome_cookbook" on Ubuntu 20.04: 8 | 9 | ```ruby 10 | require 'chefspec' 11 | 12 | describe 'awesome_cookbook::default' do 13 | before do 14 | Fauxhai.mock(platform: 'ubuntu', version: '20.04') 15 | end 16 | 17 | it 'should install awesome' do 18 | @runner = ChefSpec::ChefRunner.new.converge('tmpreaper::default') 19 | expect(@runner).to install_package 'awesome' 20 | end 21 | end 22 | ``` 23 | 24 | Alternatively, you can pull "real" Ohai data from an existing server: 25 | 26 | ```ruby 27 | require 'chefspec' 28 | 29 | describe 'awesome_cookbook::default' do 30 | before do 31 | Fauxhai.fetch(host: 'server01.example.com') 32 | end 33 | 34 | it 'should install awesome' do 35 | @runner = ChefSpec::ChefRunner.new.converge('tmpreaper::default') 36 | expect(@runner).to install_package 'awesome' 37 | end 38 | end 39 | ``` 40 | 41 | ## Important Note 42 | 43 | Fauxhai ships with a command line tool - `fauxhai`. This is **not** the same as Fauxhai.mock. Running `fauxhai` on a machine effectively runs `ohai`, but then sanitizes the data, removing/replacing things like: 44 | 45 | - users 46 | - ssh keys 47 | - usernames in paths 48 | - sensitive system information 49 | 50 | `fauxhai` should only be used by developers wishing to submit a new json file. 51 | 52 | ## Platform and Versions 53 | 54 | For a complete list of platforms and versions available for mocking via Fauxhai see [PLATFORMS.MD](https://github.com/chefspec/fauxhai/blob/master/PLATFORMS.md) in this repository. 55 | 56 | ## Usage 57 | 58 | Fauxhai provides a bunch of default attributes so that you don't need to mock out your entire infrastructure to write a simple test. That being said, not all configurations will suit your needs. Because of that, Fauxhai provides two ways to configure your mocks: 59 | 60 | ### Overriding 61 | 62 | `Fauxhai.mock` will also accept a block with override attributes that are merged with all the default attributes. For example, the default Ubuntu 12.04 mock uses `Ruby 1.9.3`. Maybe your system is using `ree`, and you want to verify that the cookbooks work with that data as well: 63 | 64 | ```ruby 65 | require 'chefspec' 66 | 67 | describe 'awesome_cookbook::default' do 68 | before do 69 | Fauxhai.mock(platform: 'ubuntu', version: '12.04') do |node| 70 | node['languages']['ruby']['version'] = 'ree' 71 | end 72 | end 73 | 74 | it 'should install awesome' do 75 | @runner = ChefSpec::ChefRunner.new.converge('tmpreaper::default') 76 | expect(@runner).to install_package 'awesome' 77 | end 78 | end 79 | ``` 80 | 81 | The `node` block variable allows you to set any Ohai attribute on the mock that you want. This provides an easy way to manage your environments. If you find that you are overriding attributes like OS or platform, you should see the section on Contributing. 82 | 83 | ### Fetching 84 | 85 | Alternatively, if you do not want to mock the data, Fauxhai provides a `fetch` mechanism for collecting "real" Ohai data from a remote server or local file. Maybe you want to test against the fully-replicated environment for a front-facing server in your pool. Just pass in the `url` option instead of a `platform`: 86 | 87 | The `fetch` method supports all the same options as the Net-SSH command, such as `:user`, `:password`, `:key_file`, etc. 88 | 89 | The `fetch` method will cache the JSON file in a temporary path on your local machine. Similar to gems like VCR, this allows Fauxhai to use the cached copy, making your test suite run faster. You can optionally force a cache miss by passing the `:force_cache_miss => true` option to the `fetch` initializer. **Because this is real data, there may be a security concern. Secure your laptop accordingly.** 90 | 91 | ```ruby 92 | require 'chefspec' 93 | 94 | describe 'awesome_cookbook::default' do 95 | before do 96 | Fauxhai.fetch(host: 'server01.example.com') 97 | end 98 | 99 | it 'should install awesome' do 100 | @runner = ChefSpec::ChefRunner.new.converge('tmpreaper::default') 101 | expect(@runner).to install_package 'awesome' 102 | end 103 | end 104 | ``` 105 | 106 | This will ssh into the machine (you must have authorization to run `sudo ohai` on that machine), download a copy of the Ohai output, and optionally cache that data inside the test directory (speeding up future tests). 107 | 108 | ### Overriding + Fetching 109 | 110 | As you might expect, you can combine overriding and fetching like so: 111 | 112 | ```ruby 113 | require 'chefspec' 114 | 115 | describe 'awesome_cookbook::default' do 116 | before do 117 | Fauxhai.fetch(host: 'server01.example.com') do |node| 118 | node['languages']['ruby']['version'] = 'ree' 119 | end 120 | end 121 | 122 | it 'should install awesome' do 123 | @runner = ChefSpec::ChefRunner.new.converge('tmpreaper::default') 124 | expect(@runner).to install_package 'awesome' 125 | end 126 | end 127 | ``` 128 | 129 | ### Fixturing 130 | 131 | If you want to use Fauxhai as "fixture" data, you can store real JSON in your project and use the `:path` option: 132 | 133 | ```ruby 134 | require 'chefspec' 135 | 136 | describe 'awesome_cookbook::default' do 137 | before do 138 | Fauxhai.mock(path: 'fixtures/my_node.json') 139 | end 140 | end 141 | ``` 142 | 143 | ### Overriding + Fixturing 144 | 145 | You can also change specific attributes in your fixture: 146 | 147 | ```ruby 148 | require 'chefspec' 149 | 150 | describe 'awesome_cookbook::default' do 151 | before do 152 | Fauxhai.mock(path: 'fixtures/my_node.json') do |node| 153 | node['languages']['ruby']['version'] = 'ree' 154 | end 155 | end 156 | end 157 | ``` 158 | 159 | ### Disabling Fetching from Github 160 | 161 | On environments that does not have access to the internet, you can disable fetching Fauxhai data from GitHub as follow: 162 | 163 | ```ruby 164 | require 'chefspec' 165 | 166 | describe 'awesome_cookbook::default' do 167 | before do 168 | Fauxhai.mock(platform: 'ubuntu', version: '12.04', github_fetching: false) 169 | end 170 | end 171 | ``` 172 | 173 | ## Testing Multiple Versions 174 | 175 | It's a common use case to test multiple version of the same operating system. Here's a simple example to get your started. This is more rspec-related that Fauxhai related, but here ya go: 176 | 177 | ```ruby 178 | require 'chefspec' 179 | 180 | describe 'awesome_cookbook::default' do 181 | ['18.04', '20.04'].each do |version| 182 | context "on Ubuntu #{version}" do 183 | before do 184 | Fauxhai.mock(platform: 'ubuntu', version: version) 185 | end 186 | 187 | it 'should install awesome' do 188 | @runner = ChefSpec::ChefRunner.new.converge('tmpreaper::default') 189 | expect(@runner).to install_package 'awesome' 190 | end 191 | end 192 | end 193 | end 194 | ``` 195 | 196 | ## Contributing 197 | 198 | See [CONTRIBUTING.md](https://github.com/chefspec/fauxhai/blob/master/CONTRIBUTING.md). 199 | -------------------------------------------------------------------------------- /lib/fauxhai/runner/default.rb: -------------------------------------------------------------------------------- 1 | module Fauxhai 2 | class Runner 3 | module Default 4 | def bin_dir 5 | "/usr/local/bin" 6 | end 7 | 8 | def counters 9 | { 10 | "network" => { 11 | "interfaces" => { 12 | "lo" => { 13 | "tx" => { 14 | "queuelen" => "1", 15 | "bytes" => 0, 16 | "packets" => 0, 17 | "errors" => 0, 18 | "drop" => 0, 19 | "carrier" => 0, 20 | "collisions" => 0, 21 | }, 22 | "rx" => { 23 | "bytes" => 0, 24 | "packets" => 0, 25 | "errors" => 0, 26 | "drop" => 0, 27 | "overrun" => 0, 28 | }, 29 | }, 30 | default_interface.to_s => { 31 | "rx" => { 32 | "bytes" => 0, 33 | "packets" => 0, 34 | "errors" => 0, 35 | "drop" => 0, 36 | "overrun" => 0, 37 | "frame" => 0, 38 | "compressed" => 0, 39 | "multicast" => 0, 40 | }, 41 | "tx" => { 42 | "bytes" => 0, 43 | "packets" => 0, 44 | "errors" => 0, 45 | "drop" => 0, 46 | "overrun" => 0, 47 | "collisions" => 0, 48 | "carrier" => 0, 49 | "compressed" => 0, 50 | }, 51 | }, 52 | }, 53 | }, 54 | } 55 | end 56 | 57 | def current_user 58 | "fauxhai" 59 | end 60 | 61 | def default_gateway 62 | "10.0.0.1" 63 | end 64 | 65 | def default_interface 66 | case @system.data["platform_family"] 67 | when "mac_os_x" 68 | "en0" 69 | when /bsd/ 70 | "em0" 71 | when "arch", "fedora" 72 | "enp0s3" 73 | else 74 | "eth0" 75 | end 76 | end 77 | 78 | def domain 79 | "local" 80 | end 81 | 82 | def fqdn 83 | "fauxhai.local" 84 | end 85 | 86 | def gem_bin 87 | "/usr/local/bin/gem" 88 | end 89 | 90 | def gems_dir 91 | "/usr/local/gems" 92 | end 93 | 94 | def hostname 95 | "Fauxhai" 96 | end 97 | 98 | def ipaddress 99 | "10.0.0.2" 100 | end 101 | 102 | def ip6address 103 | "fe80:0:0:0:0:0:a00:2" 104 | end 105 | 106 | def keys 107 | { 108 | "ssh" => ssh, 109 | } 110 | end 111 | 112 | def languages 113 | { 114 | "ruby" => @system.data["languages"]["ruby"].merge("bin_dir" => bin_dir, 115 | "gem_bin" => gem_bin, 116 | "gems_dir" => gems_dir, 117 | "ruby_bin" => ruby_bin), 118 | "powershell" => @system.data["languages"]["powershell"], 119 | } 120 | end 121 | 122 | def macaddress 123 | "11:11:11:11:11:11" 124 | end 125 | 126 | def network 127 | { 128 | "interfaces" => { 129 | "lo" => { 130 | "mtu" => "65536", 131 | "flags" => %w{LOOPBACK UP LOWER_UP}, 132 | "encapsulation" => "Loopback", 133 | "addresses" => { 134 | "127.0.0.1" => { 135 | "family" => "inet", 136 | "prefixlen" => "8", 137 | "netmask" => "255.0.0.0", 138 | "scope" => "Node", 139 | "ip_scope" => "LOOPBACK", 140 | }, 141 | "::1" => { 142 | "family" => "inet6", 143 | "prefixlen" => "128", 144 | "scope" => "Node", 145 | "tags" => [], 146 | "ip_scope" => "LINK LOCAL LOOPBACK", 147 | }, 148 | }, 149 | "state" => "unknown", 150 | }, 151 | default_interface.to_s => { 152 | "type" => default_interface.chop, 153 | "number" => "0", 154 | "mtu" => "1500", 155 | "flags" => %w{BROADCAST MULTICAST UP LOWER_UP}, 156 | "encapsulation" => "Ethernet", 157 | "addresses" => { 158 | macaddress.to_s => { 159 | "family" => "lladdr", 160 | }, 161 | ipaddress.to_s => { 162 | "family" => "inet", 163 | "prefixlen" => "24", 164 | "netmask" => "255.255.255.0", 165 | "broadcast" => "10.0.0.255", 166 | "scope" => "Global", 167 | "ip_scope" => "RFC1918 PRIVATE", 168 | }, 169 | "fe80::11:1111:1111:1111" => { 170 | "family" => "inet6", 171 | "prefixlen" => "64", 172 | "scope" => "Link", 173 | "tags" => [], 174 | "ip_scope" => "LINK LOCAL UNICAST", 175 | }, 176 | }, 177 | "state" => "up", 178 | "arp" => { 179 | "10.0.0.1" => "fe:ff:ff:ff:ff:ff", 180 | }, 181 | "routes" => [ 182 | { 183 | "destination" => "default", 184 | "family" => "inet", 185 | "via" => default_gateway, 186 | }, 187 | { 188 | "destination" => "10.0.0.0/24", 189 | "family" => "inet", 190 | "scope" => "link", 191 | "proto" => "kernel", 192 | "src" => ipaddress, 193 | }, 194 | { 195 | "destination" => "fe80::/64", 196 | "family" => "inet6", 197 | "metric" => "256", 198 | "proto" => "kernel", 199 | }, 200 | ], 201 | "ring_params" => {}, 202 | }, 203 | }, 204 | "default_interface" => default_interface, 205 | "default_gateway" => default_gateway, 206 | } 207 | end 208 | 209 | def ruby_bin 210 | "/usr/local/bin/ruby" 211 | end 212 | 213 | def ssh 214 | { 215 | "host_dsa_public" => File.read(File.join(Fauxhai.root, "lib", "fauxhai", "keys", "id_dsa.pub")).strip, 216 | "host_rsa_public" => File.read(File.join(Fauxhai.root, "lib", "fauxhai", "keys", "id_rsa.pub")).strip, 217 | } 218 | end 219 | 220 | def uptime 221 | "30 days 15 hours 07 minutes 30 seconds" 222 | end 223 | 224 | def uptime_seconds 225 | 2646450 226 | end 227 | 228 | def cpu 229 | { 230 | "real" => 1, 231 | "total" => 1, 232 | "cores" => 1, 233 | } 234 | end 235 | 236 | def memory 237 | { 238 | "total" => "1048576kB", 239 | } 240 | end 241 | 242 | def virtualization 243 | { 244 | "systems" => {}, 245 | } 246 | end 247 | 248 | def time 249 | { 250 | "timezone" => "GMT", 251 | } 252 | end 253 | 254 | # Whitelist attributes are attributes that we *actually* want from the node. Other attributes are 255 | # either ignored or overridden, but we ensure these are returned with the command. 256 | # 257 | # @return [Array] - the key of whitelisted attributes 258 | def whitelist_attributes 259 | %w{ 260 | block_device 261 | chef_packages 262 | command 263 | dmi 264 | filesystem 265 | fips 266 | init_package 267 | kernel 268 | lsb 269 | ohai_time 270 | os 271 | os_version 272 | packages 273 | platform 274 | platform_version 275 | platform_build 276 | platform_family 277 | root_group 278 | shard_seed 279 | shells 280 | } 281 | end 282 | end 283 | end 284 | end 285 | -------------------------------------------------------------------------------- /lib/fauxhai/platforms/openbsd/6.2.json: -------------------------------------------------------------------------------- 1 | { 2 | "chef_packages": { 3 | "chef": { 4 | "chef_root": "/usr/local/lib/ruby/gems/2.4/gems/chef-14.3.37/lib", 5 | "version": "14.3.37" 6 | }, 7 | "ohai": { 8 | "ohai_root": "/usr/local/lib/ruby/gems/2.4/gems/ohai-14.3.0/lib/ohai", 9 | "version": "14.3.0" 10 | } 11 | }, 12 | "command": { 13 | "ps": "ps -axww" 14 | }, 15 | "counters": { 16 | "network": { 17 | "interfaces": { 18 | "em0": { 19 | "rx": { 20 | "bytes": 0, 21 | "compressed": 0, 22 | "drop": 0, 23 | "errors": 0, 24 | "frame": 0, 25 | "multicast": 0, 26 | "overrun": 0, 27 | "packets": 0 28 | }, 29 | "tx": { 30 | "bytes": 0, 31 | "carrier": 0, 32 | "collisions": 0, 33 | "compressed": 0, 34 | "drop": 0, 35 | "errors": 0, 36 | "overrun": 0, 37 | "packets": 0 38 | } 39 | }, 40 | "lo": { 41 | "rx": { 42 | "bytes": 0, 43 | "drop": 0, 44 | "errors": 0, 45 | "overrun": 0, 46 | "packets": 0 47 | }, 48 | "tx": { 49 | "bytes": 0, 50 | "carrier": 0, 51 | "collisions": 0, 52 | "drop": 0, 53 | "errors": 0, 54 | "packets": 0, 55 | "queuelen": "1" 56 | } 57 | } 58 | } 59 | } 60 | }, 61 | "cpu": { 62 | "cores": 1, 63 | "real": 1, 64 | "total": 1 65 | }, 66 | "current_user": "fauxhai", 67 | "dmi": { 68 | "dmidecode_version": "3.1" 69 | }, 70 | "domain": "local", 71 | "filesystem": { 72 | "/dev/wd0a": { 73 | "kb_available": "918140", 74 | "kb_size": "1125820", 75 | "kb_used": "151392", 76 | "mount": "/", 77 | "percent_used": "14%" 78 | }, 79 | "/dev/wd0d": { 80 | "kb_available": "1482524", 81 | "kb_size": "1560572", 82 | "kb_used": "20", 83 | "mount": "/tmp", 84 | "percent_used": "0%" 85 | }, 86 | "/dev/wd0e": { 87 | "kb_available": "2184572", 88 | "kb_size": "2312028", 89 | "kb_used": "11856", 90 | "mount": "/var", 91 | "percent_used": "1%" 92 | }, 93 | "/dev/wd0f": { 94 | "kb_available": "1118276", 95 | "kb_size": "2638620", 96 | "kb_used": "1388416", 97 | "mount": "/usr", 98 | "percent_used": "55%" 99 | }, 100 | "/dev/wd0g": { 101 | "kb_available": "1088508", 102 | "kb_size": "1528796", 103 | "kb_used": "363852", 104 | "mount": "/usr/X11R6", 105 | "percent_used": "25%" 106 | }, 107 | "/dev/wd0h": { 108 | "kb_available": "4155176", 109 | "kb_size": "4896444", 110 | "kb_used": "496448", 111 | "mount": "/usr/local", 112 | "percent_used": "11%" 113 | }, 114 | "/dev/wd0i": { 115 | "kb_available": "2274584", 116 | "kb_size": "2394300", 117 | "kb_used": "4", 118 | "mount": "/usr/src", 119 | "percent_used": "0%" 120 | }, 121 | "/dev/wd0j": { 122 | "kb_available": "6510336", 123 | "kb_size": "6852988", 124 | "kb_used": "4", 125 | "mount": "/usr/obj", 126 | "percent_used": "0%" 127 | }, 128 | "/dev/wd0k": { 129 | "kb_available": "7462920", 130 | "kb_size": "7855708", 131 | "kb_used": "4", 132 | "mount": "/home", 133 | "percent_used": "0%" 134 | } 135 | }, 136 | "fqdn": "fauxhai.local", 137 | "hostname": "Fauxhai", 138 | "idle": "30 days 15 hours 07 minutes 30 seconds", 139 | "idletime_seconds": 2646450, 140 | "ipaddress": "10.0.0.2", 141 | "kernel": { 142 | "machine": "amd64", 143 | "name": "OpenBSD", 144 | "os": "OpenBSD", 145 | "processor": "amd64", 146 | "release": "6.2", 147 | "securelevel": [ 148 | ], 149 | "version": "GENERIC.MP#134" 150 | }, 151 | "keys": { 152 | "ssh": { 153 | "host_dsa_public": "ssh-dss AAAAB3NzaC1kc3MAAACBAJFo9BLAw4WKEs5hgipk5m423FzBsDXCZSMcC9ca/om/1VYzMqImixGe3uICDzNFUWxFoLJTQAOccyzo6MXZiQqwWJDLFi5qOSr6w2XcMyE+zd4wOyMoDiVM5fizmG8K3FzrqvGjwBcHcBdOQnavSijoj38DN25J9zhrid5BY4WlAAAAFQDxXrCyG52XCzn3FV4ej38wJBkomQAAAIBovGPJ4mP2P6BK8lHl0PPbktwQbWlpJ13oz6REJFDVcUi7vV26bX/BjQX+ohzZQzljdz1SpUbPc/8nuA4darYkVh91eBi307EN8IdxRHj2eBgp/ZG4yshIebG3WHrwJD/xUjjZ1MRfyDT1ermVi4LvjjPgWDxLZnPpMaR6S1nzgQAAAIEAj0Vd6DCWslvlsZ8+N53HWsqPi3gnx35JoLPz9Z2epkKIKqmEHav+93G3hdfztVa4I4t3phoPniQchYryF5+RNg8hqxKzjNtrIqUYCeuf2NJrksNsH7OZygPHZpqt4kTuwAGZxjxEGfAI0y8DhkU2ntp2LnzRnWH106BQBCmcXwo= fauxhai.local", 154 | "host_rsa_public": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCtLCeqtqr/HbnORckw1ukdLhpfGoOPFi5/esKEokzTqq1gsgQ2V8emmyjfq1i6XXfRtSBxkdlHv/GWdP5wBTuE2G85MzBkVSQPvmwQN8lX/JMPEEtKXkeOo0o92/PiSmvY4eRsdF0mw40Uvg7jtE3f3fxj497kzh5fKtkrHnF4x9gXCbVdr3FqXJfggR5IJwAxToerbK7x/uRS+7YuZI9Pip3tt14nv9ezwXcuGb/tvjWOZINiFl8izVIFKi7sxfTX09p4NgamxRS7TD2Yd0jT8nEoF9UZTsgXcJ1kDSx7N7NxFfNfP6rCdOGRRz4gUhXtsUjG/XkxPeCwZ7A9VnOD fauxhai.local" 155 | } 156 | }, 157 | "languages": { 158 | "powershell": null, 159 | "ruby": { 160 | "bin_dir": "/usr/local/bin", 161 | "gem_bin": "/usr/local/bin/gem", 162 | "gems_dir": "/usr/local/gems", 163 | "host": "x86_64-unknown-openbsd6.2", 164 | "host_cpu": "x86_64", 165 | "host_os": "openbsd6.2", 166 | "host_vendor": "unknown", 167 | "platform": "x86_64-openbsd", 168 | "release_date": "2017-09-14", 169 | "ruby_bin": "/usr/local/bin/ruby", 170 | "target": "x86_64-unknown-openbsd6.2", 171 | "target_cpu": "x86_64", 172 | "target_os": "openbsd6.2", 173 | "target_vendor": "unknown", 174 | "version": "2.4.2" 175 | } 176 | }, 177 | "macaddress": "11:11:11:11:11:11", 178 | "machinename": "Fauxhai", 179 | "memory": { 180 | "total": "1048576kB" 181 | }, 182 | "network": { 183 | "default_gateway": "10.0.0.1", 184 | "default_interface": "em0", 185 | "interfaces": { 186 | "em0": { 187 | "addresses": { 188 | "10.0.0.2": { 189 | "broadcast": "10.0.0.255", 190 | "family": "inet", 191 | "ip_scope": "RFC1918 PRIVATE", 192 | "netmask": "255.255.255.0", 193 | "prefixlen": "24", 194 | "scope": "Global" 195 | }, 196 | "11:11:11:11:11:11": { 197 | "family": "lladdr" 198 | }, 199 | "fe80::11:1111:1111:1111": { 200 | "family": "inet6", 201 | "ip_scope": "LINK LOCAL UNICAST", 202 | "prefixlen": "64", 203 | "scope": "Link", 204 | "tags": [ 205 | ] 206 | } 207 | }, 208 | "arp": { 209 | "10.0.0.1": "fe:ff:ff:ff:ff:ff" 210 | }, 211 | "encapsulation": "Ethernet", 212 | "flags": [ 213 | "BROADCAST", 214 | "MULTICAST", 215 | "UP", 216 | "LOWER_UP" 217 | ], 218 | "mtu": "1500", 219 | "number": "0", 220 | "ring_params": { 221 | }, 222 | "routes": [ 223 | { 224 | "destination": "default", 225 | "family": "inet", 226 | "via": "10.0.0.1" 227 | }, 228 | { 229 | "destination": "10.0.0.0/24", 230 | "family": "inet", 231 | "proto": "kernel", 232 | "scope": "link", 233 | "src": "10.0.0.2" 234 | }, 235 | { 236 | "destination": "fe80::/64", 237 | "family": "inet6", 238 | "metric": "256", 239 | "proto": "kernel" 240 | } 241 | ], 242 | "state": "up", 243 | "type": "em" 244 | }, 245 | "lo": { 246 | "addresses": { 247 | "127.0.0.1": { 248 | "family": "inet", 249 | "ip_scope": "LOOPBACK", 250 | "netmask": "255.0.0.0", 251 | "prefixlen": "8", 252 | "scope": "Node" 253 | }, 254 | "::1": { 255 | "family": "inet6", 256 | "ip_scope": "LINK LOCAL LOOPBACK", 257 | "prefixlen": "128", 258 | "scope": "Node", 259 | "tags": [ 260 | ] 261 | } 262 | }, 263 | "encapsulation": "Loopback", 264 | "flags": [ 265 | "LOOPBACK", 266 | "UP", 267 | "LOWER_UP" 268 | ], 269 | "mtu": "65536", 270 | "state": "unknown" 271 | } 272 | } 273 | }, 274 | "ohai_time": 1532045240.266272, 275 | "os": "openbsd", 276 | "os_version": "6.2", 277 | "platform": "openbsd", 278 | "platform_family": "openbsd", 279 | "platform_version": "6.2", 280 | "root_group": "wheel", 281 | "shells": [ 282 | "/bin/sh", 283 | "/bin/csh", 284 | "/bin/ksh" 285 | ], 286 | "time": { 287 | "timezone": "GMT" 288 | }, 289 | "uptime": "30 days 15 hours 07 minutes 30 seconds", 290 | "uptime_seconds": 2646450, 291 | "virtualization": { 292 | "systems": { 293 | } 294 | } 295 | } -------------------------------------------------------------------------------- /lib/fauxhai/platforms/dragonfly4/4.8-RELEASE.json: -------------------------------------------------------------------------------- 1 | { 2 | "chef_packages": { 3 | "chef": { 4 | "chef_root": "/usr/local/lib/ruby/gems/2.3/gems/chef-13.1.31/lib", 5 | "version": "13.1.31" 6 | }, 7 | "ohai": { 8 | "ohai_root": "/usr/local/lib/ruby/gems/2.3/gems/ohai-13.1.0/lib/ohai", 9 | "version": "13.1.0" 10 | } 11 | }, 12 | "command": { 13 | "ps": "ps -axww" 14 | }, 15 | "counters": { 16 | "network": { 17 | "interfaces": { 18 | "em0": { 19 | "rx": { 20 | "bytes": 0, 21 | "compressed": 0, 22 | "drop": 0, 23 | "errors": 0, 24 | "frame": 0, 25 | "multicast": 0, 26 | "overrun": 0, 27 | "packets": 0 28 | }, 29 | "tx": { 30 | "bytes": 0, 31 | "carrier": 0, 32 | "collisions": 0, 33 | "compressed": 0, 34 | "drop": 0, 35 | "errors": 0, 36 | "overrun": 0, 37 | "packets": 0 38 | } 39 | }, 40 | "lo": { 41 | "rx": { 42 | "bytes": 0, 43 | "drop": 0, 44 | "errors": 0, 45 | "overrun": 0, 46 | "packets": 0 47 | }, 48 | "tx": { 49 | "bytes": 0, 50 | "carrier": 0, 51 | "collisions": 0, 52 | "drop": 0, 53 | "errors": 0, 54 | "packets": 0, 55 | "queuelen": "1" 56 | } 57 | } 58 | } 59 | } 60 | }, 61 | "cpu": { 62 | "cores": 1, 63 | "real": 1, 64 | "total": 1 65 | }, 66 | "current_user": "fauxhai", 67 | "dmi": { 68 | }, 69 | "domain": "local", 70 | "etc": { 71 | "group": { 72 | "fauxhai": { 73 | "gid": 0, 74 | "members": [ 75 | "fauxhai" 76 | ] 77 | } 78 | }, 79 | "passwd": { 80 | "fauxhai": { 81 | "dir": "/home/fauxhai", 82 | "gecos": "Fauxhai", 83 | "gid": 0, 84 | "shell": "/bin/bash", 85 | "uid": 0 86 | } 87 | } 88 | }, 89 | "filesystem": { 90 | "/build/usr.obj": { 91 | "inodes_available": "0", 92 | "inodes_percent_used": "100", 93 | "inodes_used": "99363", 94 | "kb_available": "11621344", 95 | "kb_size": "13500416", 96 | "kb_used": "1879072", 97 | "mount": "/usr/obj", 98 | "percent_used": "14%", 99 | "total_inodes": "99363" 100 | }, 101 | "/build/var.cache": { 102 | "inodes_available": "0", 103 | "inodes_percent_used": "100", 104 | "inodes_used": "99363", 105 | "kb_available": "11621344", 106 | "kb_size": "13500416", 107 | "kb_used": "1879072", 108 | "mount": "/var/cache", 109 | "percent_used": "14%", 110 | "total_inodes": "99363" 111 | }, 112 | "/build/var.crash": { 113 | "inodes_available": "0", 114 | "inodes_percent_used": "100", 115 | "inodes_used": "99363", 116 | "kb_available": "11621344", 117 | "kb_size": "13500416", 118 | "kb_used": "1879072", 119 | "mount": "/var/crash", 120 | "percent_used": "14%", 121 | "total_inodes": "99363" 122 | }, 123 | "/build/var.log": { 124 | "inodes_available": "0", 125 | "inodes_percent_used": "100", 126 | "inodes_used": "99363", 127 | "kb_available": "11621344", 128 | "kb_size": "13500416", 129 | "kb_used": "1879072", 130 | "mount": "/var/log", 131 | "percent_used": "14%", 132 | "total_inodes": "99363" 133 | }, 134 | "/build/var.spool": { 135 | "inodes_available": "0", 136 | "inodes_percent_used": "100", 137 | "inodes_used": "99363", 138 | "kb_available": "11621344", 139 | "kb_size": "13500416", 140 | "kb_used": "1879072", 141 | "mount": "/var/spool", 142 | "percent_used": "14%", 143 | "total_inodes": "99363" 144 | }, 145 | "/build/var.tmp": { 146 | "inodes_available": "0", 147 | "inodes_percent_used": "100", 148 | "inodes_used": "99363", 149 | "kb_available": "11621344", 150 | "kb_size": "13500416", 151 | "kb_used": "1879072", 152 | "mount": "/var/tmp", 153 | "percent_used": "14%", 154 | "total_inodes": "99363" 155 | }, 156 | "/dev/serno/VB479f1e2c-4509c5c9.s1a": { 157 | "inodes_available": "15947", 158 | "inodes_percent_used": "4", 159 | "inodes_used": "691", 160 | "kb_available": "806998", 161 | "kb_size": "1046318", 162 | "kb_used": "155616", 163 | "mount": "/boot", 164 | "percent_used": "16%", 165 | "total_inodes": "16638" 166 | }, 167 | "ROOT": { 168 | "inodes_available": "0", 169 | "inodes_percent_used": "100", 170 | "inodes_used": "99363", 171 | "kb_available": "11621344", 172 | "kb_size": "13500416", 173 | "kb_used": "1879072", 174 | "mount": "/", 175 | "percent_used": "14%", 176 | "total_inodes": "99363" 177 | }, 178 | "devfs": { 179 | "inodes_available": "0", 180 | "inodes_percent_used": "100", 181 | "inodes_used": "671", 182 | "kb_available": "0", 183 | "kb_size": "1", 184 | "kb_used": "1", 185 | "mount": "/dev", 186 | "percent_used": "100%", 187 | "total_inodes": "671" 188 | }, 189 | "procfs": { 190 | "inodes_available": "1952", 191 | "inodes_percent_used": "1", 192 | "inodes_used": "20", 193 | "kb_available": "0", 194 | "kb_size": "4", 195 | "kb_used": "4", 196 | "mount": "/proc", 197 | "percent_used": "100%", 198 | "total_inodes": "1972" 199 | }, 200 | "tmpfs": { 201 | "inodes_available": "243514", 202 | "inodes_percent_used": "0", 203 | "inodes_used": "1", 204 | "kb_available": "243512", 205 | "kb_size": "243512", 206 | "kb_used": "0", 207 | "mount": "/tmp", 208 | "percent_used": "0%", 209 | "total_inodes": "243515" 210 | } 211 | }, 212 | "fqdn": "fauxhai.local", 213 | "hostname": "Fauxhai", 214 | "idle": "30 days 15 hours 07 minutes 30 seconds", 215 | "idletime_seconds": 2646450, 216 | "ipaddress": "10.0.0.2", 217 | "kernel": { 218 | "ident": "X86_64_GENERIC", 219 | "machine": "x86_64", 220 | "modules": { 221 | "acpi": { 222 | "refcount": "1", 223 | "size": "debb0" 224 | }, 225 | "ehci": { 226 | "refcount": "1", 227 | "size": "cff0" 228 | }, 229 | "kernel": { 230 | "refcount": "7", 231 | "size": "1eeb980" 232 | }, 233 | "xhci": { 234 | "refcount": "1", 235 | "size": "d350" 236 | } 237 | }, 238 | "name": "DragonFly", 239 | "os": "DragonFly", 240 | "processor": "x86_64", 241 | "release": "4.8-RELEASE", 242 | "securelevel": [ 243 | "kern.securelevel: -1" 244 | ], 245 | "version": "DragonFly v4.8.0-RELEASE #4: Sun Mar 26 20:55:22 EDT 2017 root@www.shiningsilence.com:/usr/obj/home/justin/release/4_8/sys/X86_64_GENERIC " 246 | }, 247 | "keys": { 248 | "ssh": { 249 | "host_dsa_public": "ssh-dss AAAAB3NzaC1kc3MAAACBAJFo9BLAw4WKEs5hgipk5m423FzBsDXCZSMcC9ca/om/1VYzMqImixGe3uICDzNFUWxFoLJTQAOccyzo6MXZiQqwWJDLFi5qOSr6w2XcMyE+zd4wOyMoDiVM5fizmG8K3FzrqvGjwBcHcBdOQnavSijoj38DN25J9zhrid5BY4WlAAAAFQDxXrCyG52XCzn3FV4ej38wJBkomQAAAIBovGPJ4mP2P6BK8lHl0PPbktwQbWlpJ13oz6REJFDVcUi7vV26bX/BjQX+ohzZQzljdz1SpUbPc/8nuA4darYkVh91eBi307EN8IdxRHj2eBgp/ZG4yshIebG3WHrwJD/xUjjZ1MRfyDT1ermVi4LvjjPgWDxLZnPpMaR6S1nzgQAAAIEAj0Vd6DCWslvlsZ8+N53HWsqPi3gnx35JoLPz9Z2epkKIKqmEHav+93G3hdfztVa4I4t3phoPniQchYryF5+RNg8hqxKzjNtrIqUYCeuf2NJrksNsH7OZygPHZpqt4kTuwAGZxjxEGfAI0y8DhkU2ntp2LnzRnWH106BQBCmcXwo= fauxhai.local", 250 | "host_rsa_public": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCtLCeqtqr/HbnORckw1ukdLhpfGoOPFi5/esKEokzTqq1gsgQ2V8emmyjfq1i6XXfRtSBxkdlHv/GWdP5wBTuE2G85MzBkVSQPvmwQN8lX/JMPEEtKXkeOo0o92/PiSmvY4eRsdF0mw40Uvg7jtE3f3fxj497kzh5fKtkrHnF4x9gXCbVdr3FqXJfggR5IJwAxToerbK7x/uRS+7YuZI9Pip3tt14nv9ezwXcuGb/tvjWOZINiFl8izVIFKi7sxfTX09p4NgamxRS7TD2Yd0jT8nEoF9UZTsgXcJ1kDSx7N7NxFfNfP6rCdOGRRz4gUhXtsUjG/XkxPeCwZ7A9VnOD fauxhai.local" 251 | } 252 | }, 253 | "languages": { 254 | "powershell": null, 255 | "ruby": { 256 | "bin_dir": "/usr/local/bin", 257 | "gem_bin": "/usr/local/bin/gem", 258 | "gems_dir": "/usr/local/gems", 259 | "host": "x86_64-portbld-dragonfly4", 260 | "host_cpu": "x86_64", 261 | "host_os": "dragonfly4", 262 | "host_vendor": "portbld", 263 | "platform": "x86_64-dragonfly4", 264 | "release_date": "2017-03-30", 265 | "ruby_bin": "/usr/local/bin/ruby", 266 | "target": "x86_64-portbld-dragonfly4", 267 | "target_cpu": "x86_64", 268 | "target_os": "dragonfly4", 269 | "target_vendor": "portbld", 270 | "version": "2.3.4" 271 | } 272 | }, 273 | "macaddress": "11:11:11:11:11:11", 274 | "machinename": "Fauxhai", 275 | "memory": { 276 | "total": "1048576kB" 277 | }, 278 | "network": { 279 | "default_gateway": "10.0.0.1", 280 | "default_interface": "em0", 281 | "interfaces": { 282 | "em0": { 283 | "addresses": { 284 | "10.0.0.2": { 285 | "broadcast": "10.0.0.255", 286 | "family": "inet", 287 | "ip_scope": "RFC1918 PRIVATE", 288 | "netmask": "255.255.255.0", 289 | "prefixlen": "24", 290 | "scope": "Global" 291 | }, 292 | "11:11:11:11:11:11": { 293 | "family": "lladdr" 294 | }, 295 | "fe80::11:1111:1111:1111": { 296 | "family": "inet6", 297 | "ip_scope": "LINK LOCAL UNICAST", 298 | "prefixlen": "64", 299 | "scope": "Link", 300 | "tags": [ 301 | ] 302 | } 303 | }, 304 | "arp": { 305 | "10.0.0.1": "fe:ff:ff:ff:ff:ff" 306 | }, 307 | "encapsulation": "Ethernet", 308 | "flags": [ 309 | "BROADCAST", 310 | "MULTICAST", 311 | "UP", 312 | "LOWER_UP" 313 | ], 314 | "mtu": "1500", 315 | "number": "0", 316 | "ring_params": { 317 | }, 318 | "routes": [ 319 | { 320 | "destination": "default", 321 | "family": "inet", 322 | "via": "10.0.0.1" 323 | }, 324 | { 325 | "destination": "10.0.0.0/24", 326 | "family": "inet", 327 | "proto": "kernel", 328 | "scope": "link", 329 | "src": "10.0.0.2" 330 | }, 331 | { 332 | "destination": "fe80::/64", 333 | "family": "inet6", 334 | "metric": "256", 335 | "proto": "kernel" 336 | } 337 | ], 338 | "state": "up", 339 | "type": "em" 340 | }, 341 | "lo": { 342 | "addresses": { 343 | "127.0.0.1": { 344 | "family": "inet", 345 | "ip_scope": "LOOPBACK", 346 | "netmask": "255.0.0.0", 347 | "prefixlen": "8", 348 | "scope": "Node" 349 | }, 350 | "::1": { 351 | "family": "inet6", 352 | "ip_scope": "LINK LOCAL LOOPBACK", 353 | "prefixlen": "128", 354 | "scope": "Node", 355 | "tags": [ 356 | ] 357 | } 358 | }, 359 | "encapsulation": "Loopback", 360 | "flags": [ 361 | "LOOPBACK", 362 | "UP", 363 | "LOWER_UP" 364 | ], 365 | "mtu": "65536", 366 | "state": "unknown" 367 | } 368 | } 369 | }, 370 | "ohai_time": 1497441132.986166, 371 | "os": "dragonflybsd", 372 | "os_version": "400800", 373 | "platform": "dragonfly", 374 | "platform_family": "dragonflybsd", 375 | "platform_version": "4.8-RELEASE", 376 | "root_group": "wheel", 377 | "shells": [ 378 | "/bin/sh", 379 | "/bin/csh", 380 | "/bin/tcsh", 381 | "/usr/local/libexec/git-core/git-shell" 382 | ], 383 | "time": { 384 | "timezone": "GMT" 385 | }, 386 | "uptime": "30 days 15 hours 07 minutes 30 seconds", 387 | "uptime_seconds": 2646450, 388 | "virtualization": { 389 | "systems": { 390 | } 391 | } 392 | } -------------------------------------------------------------------------------- /lib/fauxhai/platforms/freebsd/11.2.json: -------------------------------------------------------------------------------- 1 | { 2 | "chef_packages": { 3 | "chef": { 4 | "chef_root": "/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.2.0/lib", 5 | "version": "14.2.0" 6 | }, 7 | "ohai": { 8 | "ohai_root": "/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/ohai-14.2.0/lib/ohai", 9 | "version": "14.2.0" 10 | } 11 | }, 12 | "command": { 13 | "ps": "ps -axww" 14 | }, 15 | "counters": { 16 | "network": { 17 | "interfaces": { 18 | "em0": { 19 | "rx": { 20 | "bytes": 0, 21 | "compressed": 0, 22 | "drop": 0, 23 | "errors": 0, 24 | "frame": 0, 25 | "multicast": 0, 26 | "overrun": 0, 27 | "packets": 0 28 | }, 29 | "tx": { 30 | "bytes": 0, 31 | "carrier": 0, 32 | "collisions": 0, 33 | "compressed": 0, 34 | "drop": 0, 35 | "errors": 0, 36 | "overrun": 0, 37 | "packets": 0 38 | } 39 | }, 40 | "lo": { 41 | "rx": { 42 | "bytes": 0, 43 | "drop": 0, 44 | "errors": 0, 45 | "overrun": 0, 46 | "packets": 0 47 | }, 48 | "tx": { 49 | "bytes": 0, 50 | "carrier": 0, 51 | "collisions": 0, 52 | "drop": 0, 53 | "errors": 0, 54 | "packets": 0, 55 | "queuelen": "1" 56 | } 57 | } 58 | } 59 | } 60 | }, 61 | "cpu": { 62 | "cores": 1, 63 | "real": 1, 64 | "total": 1 65 | }, 66 | "current_user": "fauxhai", 67 | "deprecated": true, 68 | "dmi": { 69 | "base_board": { 70 | "all_records": [ 71 | { 72 | "Asset Tag": "Not Specified", 73 | "Chassis Handle": "0x0003", 74 | "Contained Object Handles": "0", 75 | "Features": { 76 | "Board is a hosting board": null 77 | }, 78 | "Location In Chassis": "Not Specified", 79 | "Manufacturer": "Oracle Corporation", 80 | "Product Name": "VirtualBox", 81 | "Serial Number": "0", 82 | "Type": "Motherboard", 83 | "Version": "1.2", 84 | "application_identifier": "Base Board Information", 85 | "record_id": "0x0008", 86 | "size": "2" 87 | } 88 | ], 89 | "asset_tag": "Not Specified", 90 | "chassis_handle": "0x0003", 91 | "contained_object_handles": "0", 92 | "location_in_chassis": "Not Specified", 93 | "manufacturer": "Oracle Corporation", 94 | "product_name": "VirtualBox", 95 | "serial_number": "0", 96 | "type": "Motherboard", 97 | "version": "1.2" 98 | }, 99 | "bios": { 100 | "address": "0xE0000", 101 | "all_records": [ 102 | { 103 | "Address": "0xE0000", 104 | "Characteristics": { 105 | "8042 keyboard services are supported (int 9h)": null, 106 | "ACPI is supported": null, 107 | "Boot from CD is supported": null, 108 | "CGA/mono video services are supported (int 10h)": null, 109 | "ISA is supported": null, 110 | "PCI is supported": null, 111 | "Selectable boot is supported": null 112 | }, 113 | "ROM Size": "128 kB", 114 | "Release Date": "12/01/2006", 115 | "Runtime Size": "128 kB", 116 | "Vendor": "innotek GmbH", 117 | "Version": "VirtualBox", 118 | "application_identifier": "BIOS Information", 119 | "record_id": "0x0000", 120 | "size": "0" 121 | } 122 | ], 123 | "release_date": "12/01/2006", 124 | "rom_size": "128 kB", 125 | "runtime_size": "128 kB", 126 | "vendor": "innotek GmbH", 127 | "version": "VirtualBox" 128 | }, 129 | "chassis": { 130 | "all_records": [ 131 | { 132 | "Asset Tag": "Not Specified", 133 | "Boot-up State": "Safe", 134 | "Lock": "Not Present", 135 | "Manufacturer": "Oracle Corporation", 136 | "Power Supply State": "Safe", 137 | "Security Status": "None", 138 | "Serial Number": "Not Specified", 139 | "Thermal State": "Safe", 140 | "Type": "Other", 141 | "Version": "Not Specified", 142 | "application_identifier": "Chassis Information", 143 | "record_id": "0x0003", 144 | "size": "3" 145 | } 146 | ], 147 | "asset_tag": "Not Specified", 148 | "boot_up_state": "Safe", 149 | "lock": "Not Present", 150 | "manufacturer": "Oracle Corporation", 151 | "power_supply_state": "Safe", 152 | "security_status": "None", 153 | "serial_number": "Not Specified", 154 | "thermal_state": "Safe", 155 | "type": "Other", 156 | "version": "Not Specified" 157 | }, 158 | "dmidecode_version": "3.1", 159 | "oem_strings": { 160 | "all_records": [ 161 | { 162 | "String 1": "vboxVer_5.2.12", 163 | "String 2": "vboxRev_122591", 164 | "application_identifier": "OEM Strings", 165 | "record_id": "0x0002", 166 | "size": "11" 167 | } 168 | ], 169 | "string_1": "vboxVer_5.2.12", 170 | "string_2": "vboxRev_122591" 171 | }, 172 | "smbios_version": "2.5", 173 | "structures": { 174 | "count": "10", 175 | "size": "450" 176 | }, 177 | "system": { 178 | "all_records": [ 179 | { 180 | "Family": "Virtual Machine", 181 | "Manufacturer": "innotek GmbH", 182 | "Product Name": "VirtualBox", 183 | "SKU Number": "Not Specified", 184 | "Serial Number": "0", 185 | "UUID": "35705324-5FAE-45F3-9072-1667B9AD344C", 186 | "Version": "1.2", 187 | "Wake-up Type": "Power Switch", 188 | "application_identifier": "System Information", 189 | "record_id": "0x0001", 190 | "size": "1" 191 | } 192 | ], 193 | "family": "Virtual Machine", 194 | "manufacturer": "innotek GmbH", 195 | "product_name": "VirtualBox", 196 | "serial_number": "0", 197 | "sku_number": "Not Specified", 198 | "uuid": "35705324-5FAE-45F3-9072-1667B9AD344C", 199 | "version": "1.2", 200 | "wake_up_type": "Power Switch" 201 | }, 202 | "table_location": "0x000E1000" 203 | }, 204 | "domain": "local", 205 | "filesystem": { 206 | "/dev/ada0s1a": { 207 | "fs_type": "ufs", 208 | "inodes_available": "1802343", 209 | "inodes_percent_used": "10", 210 | "inodes_used": "204055", 211 | "kb_available": "12167948", 212 | "kb_size": "15225340", 213 | "kb_used": "1839368", 214 | "mount": "/", 215 | "mount_options": [ 216 | "local", 217 | "journaled soft-updates" 218 | ], 219 | "percent_used": "13%", 220 | "total_inodes": "2006398" 221 | }, 222 | "devfs": { 223 | "fs_type": "devfs", 224 | "inodes_available": "0", 225 | "inodes_percent_used": "100", 226 | "inodes_used": "0", 227 | "kb_available": "0", 228 | "kb_size": "1", 229 | "kb_used": "1", 230 | "mount": "/dev", 231 | "mount_options": [ 232 | "local", 233 | "multilabel" 234 | ], 235 | "percent_used": "100%", 236 | "total_inodes": "0" 237 | } 238 | }, 239 | "fqdn": "fauxhai.local", 240 | "hostname": "Fauxhai", 241 | "idle": "30 days 15 hours 07 minutes 30 seconds", 242 | "idletime_seconds": 2646450, 243 | "ipaddress": "10.0.0.2", 244 | "kernel": { 245 | "ident": "GENERIC", 246 | "machine": "amd64", 247 | "modules": { 248 | "kernel": { 249 | "refcount": "1", 250 | "size": "2036810" 251 | } 252 | }, 253 | "name": "FreeBSD", 254 | "os": "FreeBSD", 255 | "processor": "amd64", 256 | "release": "11.2-RELEASE", 257 | "securelevel": [ 258 | "kern.securelevel: -1" 259 | ], 260 | "version": "FreeBSD 11.2-RELEASE #0 r335510: Fri Jun 22 04:32:14 UTC 2018 root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC " 261 | }, 262 | "keys": { 263 | "ssh": { 264 | "host_dsa_public": "ssh-dss AAAAB3NzaC1kc3MAAACBAJFo9BLAw4WKEs5hgipk5m423FzBsDXCZSMcC9ca/om/1VYzMqImixGe3uICDzNFUWxFoLJTQAOccyzo6MXZiQqwWJDLFi5qOSr6w2XcMyE+zd4wOyMoDiVM5fizmG8K3FzrqvGjwBcHcBdOQnavSijoj38DN25J9zhrid5BY4WlAAAAFQDxXrCyG52XCzn3FV4ej38wJBkomQAAAIBovGPJ4mP2P6BK8lHl0PPbktwQbWlpJ13oz6REJFDVcUi7vV26bX/BjQX+ohzZQzljdz1SpUbPc/8nuA4darYkVh91eBi307EN8IdxRHj2eBgp/ZG4yshIebG3WHrwJD/xUjjZ1MRfyDT1ermVi4LvjjPgWDxLZnPpMaR6S1nzgQAAAIEAj0Vd6DCWslvlsZ8+N53HWsqPi3gnx35JoLPz9Z2epkKIKqmEHav+93G3hdfztVa4I4t3phoPniQchYryF5+RNg8hqxKzjNtrIqUYCeuf2NJrksNsH7OZygPHZpqt4kTuwAGZxjxEGfAI0y8DhkU2ntp2LnzRnWH106BQBCmcXwo= fauxhai.local", 265 | "host_rsa_public": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCtLCeqtqr/HbnORckw1ukdLhpfGoOPFi5/esKEokzTqq1gsgQ2V8emmyjfq1i6XXfRtSBxkdlHv/GWdP5wBTuE2G85MzBkVSQPvmwQN8lX/JMPEEtKXkeOo0o92/PiSmvY4eRsdF0mw40Uvg7jtE3f3fxj497kzh5fKtkrHnF4x9gXCbVdr3FqXJfggR5IJwAxToerbK7x/uRS+7YuZI9Pip3tt14nv9ezwXcuGb/tvjWOZINiFl8izVIFKi7sxfTX09p4NgamxRS7TD2Yd0jT8nEoF9UZTsgXcJ1kDSx7N7NxFfNfP6rCdOGRRz4gUhXtsUjG/XkxPeCwZ7A9VnOD fauxhai.local" 266 | } 267 | }, 268 | "languages": { 269 | "powershell": null, 270 | "ruby": { 271 | "bin_dir": "/usr/local/bin", 272 | "gem_bin": "/usr/local/bin/gem", 273 | "gems_dir": "/usr/local/gems", 274 | "ruby_bin": "/usr/local/bin/ruby" 275 | } 276 | }, 277 | "macaddress": "11:11:11:11:11:11", 278 | "machinename": "Fauxhai", 279 | "memory": { 280 | "total": "1048576kB" 281 | }, 282 | "network": { 283 | "default_gateway": "10.0.0.1", 284 | "default_interface": "em0", 285 | "interfaces": { 286 | "em0": { 287 | "addresses": { 288 | "10.0.0.2": { 289 | "broadcast": "10.0.0.255", 290 | "family": "inet", 291 | "ip_scope": "RFC1918 PRIVATE", 292 | "netmask": "255.255.255.0", 293 | "prefixlen": "24", 294 | "scope": "Global" 295 | }, 296 | "11:11:11:11:11:11": { 297 | "family": "lladdr" 298 | }, 299 | "fe80::11:1111:1111:1111": { 300 | "family": "inet6", 301 | "ip_scope": "LINK LOCAL UNICAST", 302 | "prefixlen": "64", 303 | "scope": "Link", 304 | "tags": [ 305 | ] 306 | } 307 | }, 308 | "arp": { 309 | "10.0.0.1": "fe:ff:ff:ff:ff:ff" 310 | }, 311 | "encapsulation": "Ethernet", 312 | "flags": [ 313 | "BROADCAST", 314 | "MULTICAST", 315 | "UP", 316 | "LOWER_UP" 317 | ], 318 | "mtu": "1500", 319 | "number": "0", 320 | "ring_params": { 321 | }, 322 | "routes": [ 323 | { 324 | "destination": "default", 325 | "family": "inet", 326 | "via": "10.0.0.1" 327 | }, 328 | { 329 | "destination": "10.0.0.0/24", 330 | "family": "inet", 331 | "proto": "kernel", 332 | "scope": "link", 333 | "src": "10.0.0.2" 334 | }, 335 | { 336 | "destination": "fe80::/64", 337 | "family": "inet6", 338 | "metric": "256", 339 | "proto": "kernel" 340 | } 341 | ], 342 | "state": "up", 343 | "type": "em" 344 | }, 345 | "lo": { 346 | "addresses": { 347 | "127.0.0.1": { 348 | "family": "inet", 349 | "ip_scope": "LOOPBACK", 350 | "netmask": "255.0.0.0", 351 | "prefixlen": "8", 352 | "scope": "Node" 353 | }, 354 | "::1": { 355 | "family": "inet6", 356 | "ip_scope": "LINK LOCAL LOOPBACK", 357 | "prefixlen": "128", 358 | "scope": "Node", 359 | "tags": [ 360 | ] 361 | } 362 | }, 363 | "encapsulation": "Loopback", 364 | "flags": [ 365 | "LOOPBACK", 366 | "UP", 367 | "LOWER_UP" 368 | ], 369 | "mtu": "65536", 370 | "state": "unknown" 371 | } 372 | } 373 | }, 374 | "ohai_time": 1530184895.2087505, 375 | "os": "freebsd", 376 | "os_version": "1102000", 377 | "packages": { 378 | "ca_root_nss": { 379 | "version": "3.37.3" 380 | }, 381 | "curl": { 382 | "version": "7.60.0" 383 | }, 384 | "dmidecode": { 385 | "version": "3.1_1" 386 | }, 387 | "gettext-runtime": { 388 | "version": "0.19.8.1_1" 389 | }, 390 | "indexinfo": { 391 | "version": "0.3.1" 392 | }, 393 | "libidn2": { 394 | "version": "2.0.4" 395 | }, 396 | "libnghttp2": { 397 | "version": "1.31.1" 398 | }, 399 | "libunistring": { 400 | "version": "0.9.9" 401 | }, 402 | "pkg": { 403 | "version": "1.10.5" 404 | }, 405 | "wget": { 406 | "version": "1.19.5" 407 | } 408 | }, 409 | "platform": "freebsd", 410 | "platform_family": "freebsd", 411 | "platform_version": "11.2-RELEASE", 412 | "root_group": "wheel", 413 | "shells": [ 414 | "/bin/sh", 415 | "/bin/csh", 416 | "/bin/tcsh" 417 | ], 418 | "time": { 419 | "timezone": "GMT" 420 | }, 421 | "uptime": "30 days 15 hours 07 minutes 30 seconds", 422 | "uptime_seconds": 2646450, 423 | "virtualization": { 424 | "systems": { 425 | } 426 | } 427 | } -------------------------------------------------------------------------------- /lib/fauxhai/platforms/windows/2012.json: -------------------------------------------------------------------------------- 1 | { 2 | "chef_packages": { 3 | "chef": { 4 | "chef_root": "C:/opscode/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.10.9-universal-mingw32/lib", 5 | "version": "14.10.9" 6 | }, 7 | "ohai": { 8 | "ohai_root": "C:/opscode/chef/embedded/lib/ruby/gems/2.5.0/gems/ohai-14.8.10/lib/ohai", 9 | "version": "14.8.10" 10 | } 11 | }, 12 | "command": { 13 | }, 14 | "counters": { 15 | "network": { 16 | "interfaces": { 17 | "0xe": { 18 | "rx": { 19 | "bytes": 0, 20 | "compressed": 0, 21 | "drop": 0, 22 | "errors": 0, 23 | "frame": 0, 24 | "multicast": 0, 25 | "overrun": 0, 26 | "packets": 0 27 | }, 28 | "tx": { 29 | "bytes": 0, 30 | "carrier": 0, 31 | "collisions": 0, 32 | "compressed": 0, 33 | "drop": 0, 34 | "errors": 0, 35 | "overrun": 0, 36 | "packets": 0 37 | } 38 | }, 39 | "lo": { 40 | "rx": { 41 | "bytes": 0, 42 | "drop": 0, 43 | "errors": 0, 44 | "overrun": 0, 45 | "packets": 0 46 | }, 47 | "tx": { 48 | "bytes": 0, 49 | "carrier": 0, 50 | "collisions": 0, 51 | "drop": 0, 52 | "errors": 0, 53 | "packets": 0, 54 | "queuelen": "1" 55 | } 56 | } 57 | } 58 | } 59 | }, 60 | "cpu": { 61 | "cores": 1, 62 | "real": 1, 63 | "total": 1 64 | }, 65 | "current_user": "fauxhai", 66 | "dmi": { 67 | }, 68 | "domain": "local", 69 | "filesystem": { 70 | "C:": { 71 | "fs_type": "ntfs", 72 | "kb_available": 4132487, 73 | "kb_size": 31843151, 74 | "kb_used": 27710664, 75 | "mount": "C:", 76 | "percent_used": 87, 77 | "volume_name": "" 78 | } 79 | }, 80 | "fips": { 81 | "kernel": { 82 | "enabled": false 83 | } 84 | }, 85 | "fqdn": "fauxhai.local", 86 | "hostname": "Fauxhai", 87 | "idle": "30 days 15 hours 07 minutes 30 seconds", 88 | "idletime_seconds": 2646450, 89 | "ipaddress": "10.0.0.2", 90 | "kernel": { 91 | "cs_info": { 92 | "admin_password_status": 3, 93 | "automatic_managed_pagefile": false, 94 | "automatic_reset_boot_option": true, 95 | "automatic_reset_capability": true, 96 | "boot_option_on_limit": null, 97 | "boot_option_on_watch_dog": null, 98 | "boot_rom_supported": true, 99 | "bootup_state": "Normal boot", 100 | "caption": "WIN-326UMSID2AK", 101 | "chassis_bootup_state": 3, 102 | "current_time_zone": 0, 103 | "daylight_in_effect": null, 104 | "description": "AT/AT COMPATIBLE", 105 | "dns_host_name": "WIN-326UMSID2AK", 106 | "domain": "WORKGROUP", 107 | "domain_role": 2, 108 | "enable_daylight_savings_time": true, 109 | "front_panel_reset_status": 3, 110 | "hypervisor_present": true, 111 | "infrared_supported": false, 112 | "initial_load_info": null, 113 | "install_date": null, 114 | "keyboard_password_status": 3, 115 | "last_load_info": null, 116 | "manufacturer": "Amazon EC2", 117 | "model": "t3.large", 118 | "name": "WIN-326UMSID2AK", 119 | "name_format": null, 120 | "network_server_mode_enabled": true, 121 | "number_of_logical_processors": 2, 122 | "number_of_processors": 1, 123 | "oem_string_array": null, 124 | "part_of_domain": false, 125 | "pause_after_reset": "-1", 126 | "pc_system_type": 1, 127 | "power_management_capabilities": null, 128 | "power_management_supported": null, 129 | "power_on_password_status": 3, 130 | "power_state": 0, 131 | "power_supply_state": 3, 132 | "primary_owner_contact": null, 133 | "primary_owner_name": "EC2", 134 | "reset_capability": 1, 135 | "reset_count": -1, 136 | "reset_limit": -1, 137 | "roles": [ 138 | "LM_Workstation", 139 | "LM_Server", 140 | "NT", 141 | "Server_NT" 142 | ], 143 | "status": "OK", 144 | "support_contact_description": null, 145 | "system_startup_delay": null, 146 | "system_startup_options": null, 147 | "system_startup_setting": null, 148 | "system_type": "x64-based PC", 149 | "thermal_state": 3, 150 | "total_physical_memory": "8482549760", 151 | "user_name": null, 152 | "wake_up_type": 6, 153 | "workgroup": "WORKGROUP" 154 | }, 155 | "machine": "x86_64", 156 | "name": "Microsoft Windows Server 2012 Standard", 157 | "os": "WINNT", 158 | "os_info": { 159 | "boot_device": "\\Device\\HarddiskVolume1", 160 | "build_number": "9200", 161 | "build_type": "Multiprocessor Free", 162 | "caption": "Microsoft Windows Server 2012 Standard", 163 | "code_set": "1252", 164 | "country_code": "1", 165 | "cs_name": "WIN-326UMSID2AK", 166 | "csd_version": null, 167 | "current_time_zone": 0, 168 | "data_execution_prevention_32_bit_applications": true, 169 | "data_execution_prevention_available": true, 170 | "data_execution_prevention_drivers": true, 171 | "data_execution_prevention_support_policy": 3, 172 | "debug": false, 173 | "description": "", 174 | "distributed": false, 175 | "encryption_level": 256, 176 | "foreground_application_boost": 0, 177 | "install_date": "20190130172142.000000+000", 178 | "large_system_cache": null, 179 | "last_boot_up_time": "20190130212411.486650+000", 180 | "local_date_time": "20190130215252.274000+000", 181 | "locale": "0409", 182 | "manufacturer": "Microsoft Corporation", 183 | "max_number_of_processes": -1, 184 | "max_process_memory_size": "8589934464", 185 | "mui_languages": [ 186 | "en-US" 187 | ], 188 | "name": "Microsoft Windows Server 2012 Standard|C:\\Windows|\\Device\\Harddisk0\\Partition2", 189 | "number_of_licensed_users": 0, 190 | "number_of_processes": 39, 191 | "number_of_users": 1, 192 | "operating_system_sku": 7, 193 | "organization": "Amazon.com", 194 | "os_architecture": "64-bit", 195 | "os_language": 1033, 196 | "os_product_suite": 272, 197 | "os_type": 18, 198 | "other_type_description": null, 199 | "pae_enabled": null, 200 | "plus_product_id": null, 201 | "plus_version_number": null, 202 | "portable_operating_system": false, 203 | "primary": true, 204 | "product_type": 3, 205 | "registered_user": "EC2", 206 | "serial_number": "00184-30000-00001-AA420", 207 | "service_pack_major_version": 0, 208 | "service_pack_minor_version": 0, 209 | "size_stored_in_paging_files": "524288", 210 | "status": "OK", 211 | "suite_mask": 272, 212 | "system_device": "\\Device\\HarddiskVolume2", 213 | "system_directory": "C:\\Windows\\system32", 214 | "system_drive": "C:", 215 | "total_visible_memory_size": "8283740", 216 | "version": "6.2.9200", 217 | "windows_directory": "C:\\Windows" 218 | }, 219 | "product_type": "Server", 220 | "release": "6.2.9200", 221 | "server_core": false, 222 | "system_type": "Desktop", 223 | "version": "6.2.9200 Build 9200" 224 | }, 225 | "keys": { 226 | "ssh": { 227 | "host_dsa_public": "ssh-dss AAAAB3NzaC1kc3MAAACBAJFo9BLAw4WKEs5hgipk5m423FzBsDXCZSMcC9ca/om/1VYzMqImixGe3uICDzNFUWxFoLJTQAOccyzo6MXZiQqwWJDLFi5qOSr6w2XcMyE+zd4wOyMoDiVM5fizmG8K3FzrqvGjwBcHcBdOQnavSijoj38DN25J9zhrid5BY4WlAAAAFQDxXrCyG52XCzn3FV4ej38wJBkomQAAAIBovGPJ4mP2P6BK8lHl0PPbktwQbWlpJ13oz6REJFDVcUi7vV26bX/BjQX+ohzZQzljdz1SpUbPc/8nuA4darYkVh91eBi307EN8IdxRHj2eBgp/ZG4yshIebG3WHrwJD/xUjjZ1MRfyDT1ermVi4LvjjPgWDxLZnPpMaR6S1nzgQAAAIEAj0Vd6DCWslvlsZ8+N53HWsqPi3gnx35JoLPz9Z2epkKIKqmEHav+93G3hdfztVa4I4t3phoPniQchYryF5+RNg8hqxKzjNtrIqUYCeuf2NJrksNsH7OZygPHZpqt4kTuwAGZxjxEGfAI0y8DhkU2ntp2LnzRnWH106BQBCmcXwo= fauxhai.local", 228 | "host_rsa_public": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCtLCeqtqr/HbnORckw1ukdLhpfGoOPFi5/esKEokzTqq1gsgQ2V8emmyjfq1i6XXfRtSBxkdlHv/GWdP5wBTuE2G85MzBkVSQPvmwQN8lX/JMPEEtKXkeOo0o92/PiSmvY4eRsdF0mw40Uvg7jtE3f3fxj497kzh5fKtkrHnF4x9gXCbVdr3FqXJfggR5IJwAxToerbK7x/uRS+7YuZI9Pip3tt14nv9ezwXcuGb/tvjWOZINiFl8izVIFKi7sxfTX09p4NgamxRS7TD2Yd0jT8nEoF9UZTsgXcJ1kDSx7N7NxFfNfP6rCdOGRRz4gUhXtsUjG/XkxPeCwZ7A9VnOD fauxhai.local" 229 | } 230 | }, 231 | "languages": { 232 | "powershell": { 233 | "build_version": "6.2.9200.22199", 234 | "clr_version": "4.0.30319.42000", 235 | "compatible_versions": [ 236 | "1.0", 237 | "2.0", 238 | "3.0" 239 | ], 240 | "remoting_protocol_version": "2.2", 241 | "serialization_version": "1.1.0.1", 242 | "version": "3.0", 243 | "ws_man_stack_version": "3.0" 244 | }, 245 | "ruby": { 246 | "bin_dir": "/usr/local/bin", 247 | "gem_bin": "/usr/local/bin/gem", 248 | "gems_dir": "/usr/local/gems", 249 | "ruby_bin": "/usr/local/bin/ruby" 250 | } 251 | }, 252 | "macaddress": "11:11:11:11:11:11", 253 | "machinename": "Fauxhai", 254 | "memory": { 255 | "total": "1048576kB" 256 | }, 257 | "network": { 258 | "default_gateway": "10.0.0.1", 259 | "default_interface": "0xe", 260 | "interfaces": { 261 | "0xe": { 262 | "addresses": { 263 | "10.0.0.2": { 264 | "broadcast": "10.0.0.255", 265 | "family": "inet", 266 | "netmask": "255.255.255.0", 267 | "prefixlen": "24" 268 | }, 269 | "11:11:11:11:11:11": { 270 | "family": "lladdr" 271 | } 272 | }, 273 | "arp": { 274 | "10.0.0.1": "fe:ff:ff:ff:ff:ff" 275 | }, 276 | "configuration": { 277 | "caption": "[00000012] Ethernet Adapter", 278 | "database_path": "%SystemRoot%\\System32\\drivers\\etc", 279 | "default_ip_gateway": [ 280 | "default_gateway" 281 | ], 282 | "description": "Ethernet Adapter", 283 | "dhcp_enabled": false, 284 | "dns_domain_suffix_search_order": [ 285 | ], 286 | "dns_enabled_for_wins_resolution": false, 287 | "dns_host_name": "Fauxhai", 288 | "domain_dns_registration_enabled": false, 289 | "full_dns_registration_enabled": true, 290 | "gateway_cost_metric": [ 291 | 0 292 | ], 293 | "index": 12, 294 | "interface_index": 14, 295 | "ip_address": [ 296 | "10.0.0.2" 297 | ], 298 | "ip_connection_metric": 5, 299 | "ip_enabled": true, 300 | "ip_filter_security_enabled": false, 301 | "ip_sec_permit_ip_protocols": [ 302 | ], 303 | "ip_sec_permit_tcp_ports": [ 304 | ], 305 | "ip_sec_permit_udp_ports": [ 306 | ], 307 | "ip_subnet": [ 308 | "255.255.255.0", 309 | "64" 310 | ], 311 | "mac_address": "11:11:11:11:11:11", 312 | "service_name": "netkvm", 313 | "setting_id": "{00000000-0000-0000-0000-000000000000}", 314 | "tcp_window_size": 64240, 315 | "tcpip_netbios_options": 0, 316 | "wins_enable_lm_hosts_lookup": true, 317 | "wins_scope_id": "" 318 | }, 319 | "counters": { 320 | }, 321 | "encapsulation": "Ethernet", 322 | "instance": { 323 | "adapter_type": "Ethernet 802.3", 324 | "adapter_type_id": 0, 325 | "availability": 3, 326 | "caption": "[00000012] Ethernet Adapter", 327 | "config_manager_error_code": 0, 328 | "config_manager_user_config": false, 329 | "creation_class_name": "Win32_NetworkAdapter", 330 | "description": "Ethernet Adapter", 331 | "device_id": "12", 332 | "guid": "{00000000-0000-0000-0000-000000000000}", 333 | "index": 12, 334 | "installed": true, 335 | "interface_index": 14, 336 | "mac_address": "11:11:11:11:11:11", 337 | "manufacturer": "", 338 | "max_number_controlled": 0, 339 | "name": "Ethernet Adapter", 340 | "net_connection_id": "Ethernet", 341 | "net_connection_status": 2, 342 | "net_enabled": true, 343 | "physical_adapter": true, 344 | "pnp_device_id": "PCI\\VEN_0000&DEV_0000&SUBSYS_000000000&REV_00\\0&0000000000&00", 345 | "power_management_supported": false, 346 | "product_name": "Ethernet Adapter", 347 | "service_name": "netkvm", 348 | "speed": "10000000000", 349 | "system_creation_class_name": "Win32_ComputerSystem", 350 | "system_name": "Fauxhai", 351 | "time_of_last_reset": "20000101000001.000000+000" 352 | }, 353 | "type": "Ethernet 802.3" 354 | } 355 | } 356 | }, 357 | "ohai_time": 1548885175.649484, 358 | "os": "windows", 359 | "os_version": "6.2.9200", 360 | "packages": { 361 | "AWS PV Drivers": { 362 | "installdate": "20181014", 363 | "publisher": "Amazon Web Services", 364 | "version": "8.2.4" 365 | }, 366 | "AWS Tools for Windows": { 367 | "installdate": "20190109", 368 | "publisher": "Amazon Web Services Developer Relations", 369 | "version": "3.15.647" 370 | }, 371 | "Amazon SSM Agent": { 372 | "publisher": "Amazon Web Services", 373 | "version": "2.3.344.0" 374 | }, 375 | "Chef Client v14.10.9": { 376 | "installdate": "20190130", 377 | "publisher": "Chef Software, Inc.", 378 | "version": "14.10.9.1" 379 | }, 380 | "EC2ConfigService": { 381 | "publisher": "Amazon Web Services", 382 | "version": "4.9.3160.0" 383 | }, 384 | "aws-cfn-bootstrap": { 385 | "installdate": "20120924", 386 | "publisher": "Amazon Web Services", 387 | "version": "1.3.5" 388 | } 389 | }, 390 | "platform": "windows", 391 | "platform_family": "windows", 392 | "platform_version": "6.2.9200", 393 | "root_group": "Administrators", 394 | "shard_seed": 143500384, 395 | "time": { 396 | "timezone": "GMT" 397 | }, 398 | "uptime": "30 days 15 hours 07 minutes 30 seconds", 399 | "uptime_seconds": 2646450, 400 | "virtualization": { 401 | "systems": { 402 | } 403 | } 404 | } -------------------------------------------------------------------------------- /lib/fauxhai/platforms/windows/2012R2.json: -------------------------------------------------------------------------------- 1 | { 2 | "chef_packages": { 3 | "chef": { 4 | "chef_root": "C:/opscode/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.10.9-universal-mingw32/lib", 5 | "version": "14.10.9" 6 | }, 7 | "ohai": { 8 | "ohai_root": "C:/opscode/chef/embedded/lib/ruby/gems/2.5.0/gems/ohai-14.8.10/lib/ohai", 9 | "version": "14.8.10" 10 | } 11 | }, 12 | "command": { 13 | }, 14 | "counters": { 15 | "network": { 16 | "interfaces": { 17 | "0xe": { 18 | "rx": { 19 | "bytes": 0, 20 | "compressed": 0, 21 | "drop": 0, 22 | "errors": 0, 23 | "frame": 0, 24 | "multicast": 0, 25 | "overrun": 0, 26 | "packets": 0 27 | }, 28 | "tx": { 29 | "bytes": 0, 30 | "carrier": 0, 31 | "collisions": 0, 32 | "compressed": 0, 33 | "drop": 0, 34 | "errors": 0, 35 | "overrun": 0, 36 | "packets": 0 37 | } 38 | }, 39 | "lo": { 40 | "rx": { 41 | "bytes": 0, 42 | "drop": 0, 43 | "errors": 0, 44 | "overrun": 0, 45 | "packets": 0 46 | }, 47 | "tx": { 48 | "bytes": 0, 49 | "carrier": 0, 50 | "collisions": 0, 51 | "drop": 0, 52 | "errors": 0, 53 | "packets": 0, 54 | "queuelen": "1" 55 | } 56 | } 57 | } 58 | } 59 | }, 60 | "cpu": { 61 | "cores": 1, 62 | "real": 1, 63 | "total": 1 64 | }, 65 | "current_user": "fauxhai", 66 | "dmi": { 67 | }, 68 | "domain": "local", 69 | "filesystem": { 70 | "C:": { 71 | "fs_type": "ntfs", 72 | "kb_available": 8527413, 73 | "kb_size": 31843151, 74 | "kb_used": 23315738, 75 | "mount": "C:", 76 | "percent_used": 73, 77 | "volume_name": "" 78 | } 79 | }, 80 | "fips": { 81 | "kernel": { 82 | "enabled": false 83 | } 84 | }, 85 | "fqdn": "fauxhai.local", 86 | "hostname": "Fauxhai", 87 | "idle": "30 days 15 hours 07 minutes 30 seconds", 88 | "idletime_seconds": 2646450, 89 | "ipaddress": "10.0.0.2", 90 | "kernel": { 91 | "cs_info": { 92 | "admin_password_status": 3, 93 | "automatic_managed_pagefile": false, 94 | "automatic_reset_boot_option": true, 95 | "automatic_reset_capability": true, 96 | "boot_option_on_limit": null, 97 | "boot_option_on_watch_dog": null, 98 | "boot_rom_supported": true, 99 | "bootup_state": "Normal boot", 100 | "caption": "WIN-3GOSR0HBP7K", 101 | "chassis_bootup_state": 3, 102 | "current_time_zone": 0, 103 | "daylight_in_effect": null, 104 | "description": "AT/AT COMPATIBLE", 105 | "dns_host_name": "WIN-3GOSR0HBP7K", 106 | "domain": "WORKGROUP", 107 | "domain_role": 2, 108 | "enable_daylight_savings_time": true, 109 | "front_panel_reset_status": 3, 110 | "hypervisor_present": true, 111 | "infrared_supported": false, 112 | "initial_load_info": null, 113 | "install_date": null, 114 | "keyboard_password_status": 3, 115 | "last_load_info": null, 116 | "manufacturer": "Amazon EC2", 117 | "model": "t3.large", 118 | "name": "WIN-3GOSR0HBP7K", 119 | "name_format": null, 120 | "network_server_mode_enabled": true, 121 | "number_of_logical_processors": 2, 122 | "number_of_processors": 1, 123 | "oem_string_array": null, 124 | "part_of_domain": false, 125 | "pause_after_reset": "-1", 126 | "pc_system_type": 1, 127 | "pc_system_type_ex": 1, 128 | "power_management_capabilities": null, 129 | "power_management_supported": null, 130 | "power_on_password_status": 3, 131 | "power_state": 0, 132 | "power_supply_state": 3, 133 | "primary_owner_contact": null, 134 | "primary_owner_name": "EC2", 135 | "reset_capability": 1, 136 | "reset_count": -1, 137 | "reset_limit": -1, 138 | "roles": [ 139 | "LM_Workstation", 140 | "LM_Server", 141 | "NT", 142 | "Server_NT" 143 | ], 144 | "status": "OK", 145 | "support_contact_description": null, 146 | "system_startup_delay": null, 147 | "system_startup_options": null, 148 | "system_startup_setting": null, 149 | "system_type": "x64-based PC", 150 | "thermal_state": 3, 151 | "total_physical_memory": "8482549760", 152 | "user_name": null, 153 | "wake_up_type": 6, 154 | "workgroup": "WORKGROUP" 155 | }, 156 | "machine": "x86_64", 157 | "name": "Microsoft Windows Server 2012 R2 Standard", 158 | "os": "WINNT", 159 | "os_info": { 160 | "boot_device": "\\Device\\HarddiskVolume1", 161 | "build_number": "9600", 162 | "build_type": "Multiprocessor Free", 163 | "caption": "Microsoft Windows Server 2012 R2 Standard", 164 | "code_set": "1252", 165 | "country_code": "1", 166 | "cs_name": "WIN-3GOSR0HBP7K", 167 | "csd_version": null, 168 | "current_time_zone": 0, 169 | "data_execution_prevention_32_bit_applications": true, 170 | "data_execution_prevention_available": true, 171 | "data_execution_prevention_drivers": true, 172 | "data_execution_prevention_support_policy": 3, 173 | "debug": false, 174 | "description": "", 175 | "distributed": false, 176 | "encryption_level": 256, 177 | "foreground_application_boost": 2, 178 | "install_date": "20190130205703.000000+000", 179 | "large_system_cache": null, 180 | "last_boot_up_time": "20190130212432.490118+000", 181 | "local_date_time": "20190130221541.702000+000", 182 | "locale": "0409", 183 | "manufacturer": "Microsoft Corporation", 184 | "max_number_of_processes": -1, 185 | "max_process_memory_size": "137438953344", 186 | "mui_languages": [ 187 | "en-US" 188 | ], 189 | "name": "Microsoft Windows Server 2012 R2 Standard|C:\\Windows|\\Device\\Harddisk0\\Partition2", 190 | "number_of_licensed_users": 0, 191 | "number_of_processes": 41, 192 | "number_of_users": 1, 193 | "operating_system_sku": 7, 194 | "organization": "Amazon.com", 195 | "os_architecture": "64-bit", 196 | "os_language": 1033, 197 | "os_product_suite": 272, 198 | "os_type": 18, 199 | "other_type_description": null, 200 | "pae_enabled": null, 201 | "plus_product_id": null, 202 | "plus_version_number": null, 203 | "portable_operating_system": false, 204 | "primary": true, 205 | "product_type": 3, 206 | "registered_user": "EC2", 207 | "serial_number": "00252-70000-00000-AA535", 208 | "service_pack_major_version": 0, 209 | "service_pack_minor_version": 0, 210 | "size_stored_in_paging_files": "8388608", 211 | "status": "OK", 212 | "suite_mask": 272, 213 | "system_device": "\\Device\\HarddiskVolume2", 214 | "system_directory": "C:\\Windows\\system32", 215 | "system_drive": "C:", 216 | "total_visible_memory_size": "8283740", 217 | "version": "6.3.9600", 218 | "windows_directory": "C:\\Windows" 219 | }, 220 | "product_type": "Server", 221 | "release": "6.3.9600", 222 | "server_core": false, 223 | "system_type": "Desktop", 224 | "version": "6.3.9600 Build 9600" 225 | }, 226 | "keys": { 227 | "ssh": { 228 | "host_dsa_public": "ssh-dss AAAAB3NzaC1kc3MAAACBAJFo9BLAw4WKEs5hgipk5m423FzBsDXCZSMcC9ca/om/1VYzMqImixGe3uICDzNFUWxFoLJTQAOccyzo6MXZiQqwWJDLFi5qOSr6w2XcMyE+zd4wOyMoDiVM5fizmG8K3FzrqvGjwBcHcBdOQnavSijoj38DN25J9zhrid5BY4WlAAAAFQDxXrCyG52XCzn3FV4ej38wJBkomQAAAIBovGPJ4mP2P6BK8lHl0PPbktwQbWlpJ13oz6REJFDVcUi7vV26bX/BjQX+ohzZQzljdz1SpUbPc/8nuA4darYkVh91eBi307EN8IdxRHj2eBgp/ZG4yshIebG3WHrwJD/xUjjZ1MRfyDT1ermVi4LvjjPgWDxLZnPpMaR6S1nzgQAAAIEAj0Vd6DCWslvlsZ8+N53HWsqPi3gnx35JoLPz9Z2epkKIKqmEHav+93G3hdfztVa4I4t3phoPniQchYryF5+RNg8hqxKzjNtrIqUYCeuf2NJrksNsH7OZygPHZpqt4kTuwAGZxjxEGfAI0y8DhkU2ntp2LnzRnWH106BQBCmcXwo= fauxhai.local", 229 | "host_rsa_public": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCtLCeqtqr/HbnORckw1ukdLhpfGoOPFi5/esKEokzTqq1gsgQ2V8emmyjfq1i6XXfRtSBxkdlHv/GWdP5wBTuE2G85MzBkVSQPvmwQN8lX/JMPEEtKXkeOo0o92/PiSmvY4eRsdF0mw40Uvg7jtE3f3fxj497kzh5fKtkrHnF4x9gXCbVdr3FqXJfggR5IJwAxToerbK7x/uRS+7YuZI9Pip3tt14nv9ezwXcuGb/tvjWOZINiFl8izVIFKi7sxfTX09p4NgamxRS7TD2Yd0jT8nEoF9UZTsgXcJ1kDSx7N7NxFfNfP6rCdOGRRz4gUhXtsUjG/XkxPeCwZ7A9VnOD fauxhai.local" 230 | } 231 | }, 232 | "languages": { 233 | "powershell": { 234 | "build_version": "6.3.9600.19170", 235 | "clr_version": "4.0.30319.42000", 236 | "compatible_versions": [ 237 | "1.0", 238 | "2.0", 239 | "3.0", 240 | "4.0" 241 | ], 242 | "remoting_protocol_version": "2.2", 243 | "serialization_version": "1.1.0.1", 244 | "version": "4.0", 245 | "ws_man_stack_version": "3.0" 246 | }, 247 | "ruby": { 248 | "bin_dir": "/usr/local/bin", 249 | "gem_bin": "/usr/local/bin/gem", 250 | "gems_dir": "/usr/local/gems", 251 | "ruby_bin": "/usr/local/bin/ruby" 252 | } 253 | }, 254 | "macaddress": "11:11:11:11:11:11", 255 | "machinename": "Fauxhai", 256 | "memory": { 257 | "total": "1048576kB" 258 | }, 259 | "network": { 260 | "default_gateway": "10.0.0.1", 261 | "default_interface": "0xe", 262 | "interfaces": { 263 | "0xe": { 264 | "addresses": { 265 | "10.0.0.2": { 266 | "broadcast": "10.0.0.255", 267 | "family": "inet", 268 | "netmask": "255.255.255.0", 269 | "prefixlen": "24" 270 | }, 271 | "11:11:11:11:11:11": { 272 | "family": "lladdr" 273 | } 274 | }, 275 | "arp": { 276 | "10.0.0.1": "fe:ff:ff:ff:ff:ff" 277 | }, 278 | "configuration": { 279 | "caption": "[00000012] Ethernet Adapter", 280 | "database_path": "%SystemRoot%\\System32\\drivers\\etc", 281 | "default_ip_gateway": [ 282 | "default_gateway" 283 | ], 284 | "description": "Ethernet Adapter", 285 | "dhcp_enabled": false, 286 | "dns_domain_suffix_search_order": [ 287 | ], 288 | "dns_enabled_for_wins_resolution": false, 289 | "dns_host_name": "Fauxhai", 290 | "domain_dns_registration_enabled": false, 291 | "full_dns_registration_enabled": true, 292 | "gateway_cost_metric": [ 293 | 0 294 | ], 295 | "index": 12, 296 | "interface_index": 14, 297 | "ip_address": [ 298 | "10.0.0.2" 299 | ], 300 | "ip_connection_metric": 5, 301 | "ip_enabled": true, 302 | "ip_filter_security_enabled": false, 303 | "ip_sec_permit_ip_protocols": [ 304 | ], 305 | "ip_sec_permit_tcp_ports": [ 306 | ], 307 | "ip_sec_permit_udp_ports": [ 308 | ], 309 | "ip_subnet": [ 310 | "255.255.255.0", 311 | "64" 312 | ], 313 | "mac_address": "11:11:11:11:11:11", 314 | "service_name": "netkvm", 315 | "setting_id": "{00000000-0000-0000-0000-000000000000}", 316 | "tcp_window_size": 64240, 317 | "tcpip_netbios_options": 0, 318 | "wins_enable_lm_hosts_lookup": true, 319 | "wins_scope_id": "" 320 | }, 321 | "counters": { 322 | }, 323 | "encapsulation": "Ethernet", 324 | "instance": { 325 | "adapter_type": "Ethernet 802.3", 326 | "adapter_type_id": 0, 327 | "availability": 3, 328 | "caption": "[00000012] Ethernet Adapter", 329 | "config_manager_error_code": 0, 330 | "config_manager_user_config": false, 331 | "creation_class_name": "Win32_NetworkAdapter", 332 | "description": "Ethernet Adapter", 333 | "device_id": "12", 334 | "guid": "{00000000-0000-0000-0000-000000000000}", 335 | "index": 12, 336 | "installed": true, 337 | "interface_index": 14, 338 | "mac_address": "11:11:11:11:11:11", 339 | "manufacturer": "", 340 | "max_number_controlled": 0, 341 | "name": "Ethernet Adapter", 342 | "net_connection_id": "Ethernet", 343 | "net_connection_status": 2, 344 | "net_enabled": true, 345 | "physical_adapter": true, 346 | "pnp_device_id": "PCI\\VEN_0000&DEV_0000&SUBSYS_000000000&REV_00\\0&0000000000&00", 347 | "power_management_supported": false, 348 | "product_name": "Ethernet Adapter", 349 | "service_name": "netkvm", 350 | "speed": "10000000000", 351 | "system_creation_class_name": "Win32_ComputerSystem", 352 | "system_name": "Fauxhai", 353 | "time_of_last_reset": "20000101000001.000000+000" 354 | }, 355 | "type": "Ethernet 802.3" 356 | } 357 | } 358 | }, 359 | "ohai_time": 1548886544.968044, 360 | "os": "windows", 361 | "os_version": "6.3.9600", 362 | "packages": { 363 | "AWS PV Drivers": { 364 | "installdate": "20181014", 365 | "publisher": "Amazon Web Services", 366 | "version": "8.2.4" 367 | }, 368 | "AWS Tools for Windows": { 369 | "installdate": "20190109", 370 | "publisher": "Amazon Web Services Developer Relations", 371 | "version": "3.15.647" 372 | }, 373 | "Amazon SSM Agent": { 374 | "publisher": "Amazon Web Services", 375 | "version": "2.3.344.0" 376 | }, 377 | "Chef Client v14.10.9": { 378 | "installdate": "20190130", 379 | "publisher": "Chef Software, Inc.", 380 | "version": "14.10.9.1" 381 | }, 382 | "EC2ConfigService": { 383 | "publisher": "Amazon Web Services", 384 | "version": "4.9.3160.0" 385 | }, 386 | "aws-cfn-bootstrap": { 387 | "installdate": "20181014", 388 | "publisher": "Amazon Web Services", 389 | "version": "1.4.31" 390 | } 391 | }, 392 | "platform": "windows", 393 | "platform_family": "windows", 394 | "platform_version": "6.3.9600", 395 | "root_group": "Administrators", 396 | "shard_seed": 160657640, 397 | "time": { 398 | "timezone": "GMT" 399 | }, 400 | "uptime": "30 days 15 hours 07 minutes 30 seconds", 401 | "uptime_seconds": 2646450, 402 | "virtualization": { 403 | "systems": { 404 | } 405 | } 406 | } -------------------------------------------------------------------------------- /lib/fauxhai/platforms/windows/2016.json: -------------------------------------------------------------------------------- 1 | { 2 | "chef_packages": { 3 | "chef": { 4 | "chef_root": "C:/opscode/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.10.9-universal-mingw32/lib", 5 | "version": "14.10.9" 6 | }, 7 | "ohai": { 8 | "ohai_root": "C:/opscode/chef/embedded/lib/ruby/gems/2.5.0/gems/ohai-14.8.10/lib/ohai", 9 | "version": "14.8.10" 10 | } 11 | }, 12 | "command": { 13 | }, 14 | "counters": { 15 | "network": { 16 | "interfaces": { 17 | "0xe": { 18 | "rx": { 19 | "bytes": 0, 20 | "compressed": 0, 21 | "drop": 0, 22 | "errors": 0, 23 | "frame": 0, 24 | "multicast": 0, 25 | "overrun": 0, 26 | "packets": 0 27 | }, 28 | "tx": { 29 | "bytes": 0, 30 | "carrier": 0, 31 | "collisions": 0, 32 | "compressed": 0, 33 | "drop": 0, 34 | "errors": 0, 35 | "overrun": 0, 36 | "packets": 0 37 | } 38 | }, 39 | "lo": { 40 | "rx": { 41 | "bytes": 0, 42 | "drop": 0, 43 | "errors": 0, 44 | "overrun": 0, 45 | "packets": 0 46 | }, 47 | "tx": { 48 | "bytes": 0, 49 | "carrier": 0, 50 | "collisions": 0, 51 | "drop": 0, 52 | "errors": 0, 53 | "packets": 0, 54 | "queuelen": "1" 55 | } 56 | } 57 | } 58 | } 59 | }, 60 | "cpu": { 61 | "cores": 1, 62 | "real": 1, 63 | "total": 1 64 | }, 65 | "current_user": "fauxhai", 66 | "dmi": { 67 | }, 68 | "domain": "local", 69 | "filesystem": { 70 | "C:": { 71 | "fs_type": "ntfs", 72 | "kb_available": 14526156, 73 | "kb_size": 32210153, 74 | "kb_used": 17683997, 75 | "mount": "C:", 76 | "percent_used": 54, 77 | "volume_name": "" 78 | } 79 | }, 80 | "fips": { 81 | "kernel": { 82 | "enabled": false 83 | } 84 | }, 85 | "fqdn": "fauxhai.local", 86 | "hostname": "Fauxhai", 87 | "idle": "30 days 15 hours 07 minutes 30 seconds", 88 | "idletime_seconds": 2646450, 89 | "ipaddress": "10.0.0.2", 90 | "kernel": { 91 | "cs_info": { 92 | "admin_password_status": 3, 93 | "automatic_managed_pagefile": true, 94 | "automatic_reset_boot_option": true, 95 | "automatic_reset_capability": true, 96 | "boot_option_on_limit": null, 97 | "boot_option_on_watch_dog": null, 98 | "boot_rom_supported": true, 99 | "boot_status": null, 100 | "bootup_state": "Normal boot", 101 | "caption": "EC2AMAZ-48QB74U", 102 | "chassis_bootup_state": 3, 103 | "chassis_sku_number": null, 104 | "current_time_zone": 0, 105 | "daylight_in_effect": null, 106 | "description": "AT/AT COMPATIBLE", 107 | "dns_host_name": "EC2AMAZ-48QB74U", 108 | "domain": "WORKGROUP", 109 | "domain_role": 2, 110 | "enable_daylight_savings_time": true, 111 | "front_panel_reset_status": 3, 112 | "hypervisor_present": true, 113 | "infrared_supported": false, 114 | "initial_load_info": null, 115 | "install_date": null, 116 | "keyboard_password_status": 3, 117 | "last_load_info": null, 118 | "manufacturer": "Amazon EC2", 119 | "model": "t3.large", 120 | "name": "EC2AMAZ-48QB74U", 121 | "name_format": null, 122 | "network_server_mode_enabled": true, 123 | "number_of_logical_processors": 2, 124 | "number_of_processors": 1, 125 | "oem_string_array": null, 126 | "part_of_domain": false, 127 | "pause_after_reset": "-1", 128 | "pc_system_type": 1, 129 | "pc_system_type_ex": 1, 130 | "power_management_capabilities": null, 131 | "power_management_supported": null, 132 | "power_on_password_status": 3, 133 | "power_state": 0, 134 | "power_supply_state": 3, 135 | "primary_owner_contact": null, 136 | "primary_owner_name": "EC2", 137 | "reset_capability": 1, 138 | "reset_count": -1, 139 | "reset_limit": -1, 140 | "roles": [ 141 | "LM_Workstation", 142 | "LM_Server", 143 | "NT", 144 | "Server_NT" 145 | ], 146 | "status": "OK", 147 | "support_contact_description": null, 148 | "system_family": null, 149 | "system_sku_number": null, 150 | "system_startup_delay": null, 151 | "system_startup_options": null, 152 | "system_startup_setting": null, 153 | "system_type": "x64-based PC", 154 | "thermal_state": 3, 155 | "total_physical_memory": "8482549760", 156 | "user_name": null, 157 | "wake_up_type": 6, 158 | "workgroup": "WORKGROUP" 159 | }, 160 | "machine": "x86_64", 161 | "name": "Microsoft Windows Server 2016 Datacenter", 162 | "os": "WINNT", 163 | "os_info": { 164 | "boot_device": "\\Device\\HarddiskVolume1", 165 | "build_number": "14393", 166 | "build_type": "Multiprocessor Free", 167 | "caption": "Microsoft Windows Server 2016 Datacenter", 168 | "code_set": "1252", 169 | "country_code": "1", 170 | "cs_name": "EC2AMAZ-48QB74U", 171 | "csd_version": null, 172 | "current_time_zone": 0, 173 | "data_execution_prevention_32_bit_applications": true, 174 | "data_execution_prevention_available": true, 175 | "data_execution_prevention_drivers": true, 176 | "data_execution_prevention_support_policy": 3, 177 | "debug": false, 178 | "description": "", 179 | "distributed": false, 180 | "encryption_level": 256, 181 | "foreground_application_boost": 2, 182 | "install_date": "20190130210339.000000+000", 183 | "large_system_cache": null, 184 | "last_boot_up_time": "20190130212333.492496+000", 185 | "local_date_time": "20190130214132.123000+000", 186 | "locale": "0409", 187 | "manufacturer": "Microsoft Corporation", 188 | "max_number_of_processes": -1, 189 | "max_process_memory_size": "137438953344", 190 | "mui_languages": [ 191 | "en-US" 192 | ], 193 | "name": "Microsoft Windows Server 2016 Datacenter|C:\\Windows|\\Device\\Harddisk0\\Partition1", 194 | "number_of_licensed_users": 0, 195 | "number_of_processes": 52, 196 | "number_of_users": 1, 197 | "operating_system_sku": 8, 198 | "organization": "Amazon.com", 199 | "os_architecture": "64-bit", 200 | "os_language": 1033, 201 | "os_product_suite": 400, 202 | "os_type": 18, 203 | "other_type_description": null, 204 | "pae_enabled": null, 205 | "plus_product_id": null, 206 | "plus_version_number": null, 207 | "portable_operating_system": false, 208 | "primary": true, 209 | "product_type": 3, 210 | "registered_user": "EC2", 211 | "serial_number": "00376-40000-00000-AA753", 212 | "service_pack_major_version": 0, 213 | "service_pack_minor_version": 0, 214 | "size_stored_in_paging_files": "1966080", 215 | "status": "OK", 216 | "suite_mask": 400, 217 | "system_device": "\\Device\\HarddiskVolume1", 218 | "system_directory": "C:\\Windows\\system32", 219 | "system_drive": "C:", 220 | "total_visible_memory_size": "8283740", 221 | "version": "10.0.14393", 222 | "windows_directory": "C:\\Windows" 223 | }, 224 | "product_type": "Server", 225 | "release": "10.0.14393", 226 | "server_core": false, 227 | "system_type": "Desktop", 228 | "version": "10.0.14393 Build 14393" 229 | }, 230 | "keys": { 231 | "ssh": { 232 | "host_dsa_public": "ssh-dss AAAAB3NzaC1kc3MAAACBAJFo9BLAw4WKEs5hgipk5m423FzBsDXCZSMcC9ca/om/1VYzMqImixGe3uICDzNFUWxFoLJTQAOccyzo6MXZiQqwWJDLFi5qOSr6w2XcMyE+zd4wOyMoDiVM5fizmG8K3FzrqvGjwBcHcBdOQnavSijoj38DN25J9zhrid5BY4WlAAAAFQDxXrCyG52XCzn3FV4ej38wJBkomQAAAIBovGPJ4mP2P6BK8lHl0PPbktwQbWlpJ13oz6REJFDVcUi7vV26bX/BjQX+ohzZQzljdz1SpUbPc/8nuA4darYkVh91eBi307EN8IdxRHj2eBgp/ZG4yshIebG3WHrwJD/xUjjZ1MRfyDT1ermVi4LvjjPgWDxLZnPpMaR6S1nzgQAAAIEAj0Vd6DCWslvlsZ8+N53HWsqPi3gnx35JoLPz9Z2epkKIKqmEHav+93G3hdfztVa4I4t3phoPniQchYryF5+RNg8hqxKzjNtrIqUYCeuf2NJrksNsH7OZygPHZpqt4kTuwAGZxjxEGfAI0y8DhkU2ntp2LnzRnWH106BQBCmcXwo= fauxhai.local", 233 | "host_rsa_public": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCtLCeqtqr/HbnORckw1ukdLhpfGoOPFi5/esKEokzTqq1gsgQ2V8emmyjfq1i6XXfRtSBxkdlHv/GWdP5wBTuE2G85MzBkVSQPvmwQN8lX/JMPEEtKXkeOo0o92/PiSmvY4eRsdF0mw40Uvg7jtE3f3fxj497kzh5fKtkrHnF4x9gXCbVdr3FqXJfggR5IJwAxToerbK7x/uRS+7YuZI9Pip3tt14nv9ezwXcuGb/tvjWOZINiFl8izVIFKi7sxfTX09p4NgamxRS7TD2Yd0jT8nEoF9UZTsgXcJ1kDSx7N7NxFfNfP6rCdOGRRz4gUhXtsUjG/XkxPeCwZ7A9VnOD fauxhai.local" 234 | } 235 | }, 236 | "languages": { 237 | "powershell": { 238 | "build_version": "10.0.14393.2636", 239 | "clr_version": "4.0.30319.42000", 240 | "compatible_versions": [ 241 | "1.0", 242 | "2.0", 243 | "3.0", 244 | "4.0", 245 | "5.0", 246 | "5.1.14393.2636" 247 | ], 248 | "remoting_protocol_version": "2.3", 249 | "serialization_version": "1.1.0.1", 250 | "version": "5.1.14393.2636", 251 | "ws_man_stack_version": "3.0" 252 | }, 253 | "ruby": { 254 | "bin_dir": "/usr/local/bin", 255 | "gem_bin": "/usr/local/bin/gem", 256 | "gems_dir": "/usr/local/gems", 257 | "ruby_bin": "/usr/local/bin/ruby" 258 | } 259 | }, 260 | "macaddress": "11:11:11:11:11:11", 261 | "machinename": "Fauxhai", 262 | "memory": { 263 | "total": "1048576kB" 264 | }, 265 | "network": { 266 | "default_gateway": "10.0.0.1", 267 | "default_interface": "0xe", 268 | "interfaces": { 269 | "0xe": { 270 | "addresses": { 271 | "10.0.0.2": { 272 | "broadcast": "10.0.0.255", 273 | "family": "inet", 274 | "netmask": "255.255.255.0", 275 | "prefixlen": "24" 276 | }, 277 | "11:11:11:11:11:11": { 278 | "family": "lladdr" 279 | } 280 | }, 281 | "arp": { 282 | "10.0.0.1": "fe:ff:ff:ff:ff:ff" 283 | }, 284 | "configuration": { 285 | "caption": "[00000012] Ethernet Adapter", 286 | "database_path": "%SystemRoot%\\System32\\drivers\\etc", 287 | "default_ip_gateway": [ 288 | "default_gateway" 289 | ], 290 | "description": "Ethernet Adapter", 291 | "dhcp_enabled": false, 292 | "dns_domain_suffix_search_order": [ 293 | ], 294 | "dns_enabled_for_wins_resolution": false, 295 | "dns_host_name": "Fauxhai", 296 | "domain_dns_registration_enabled": false, 297 | "full_dns_registration_enabled": true, 298 | "gateway_cost_metric": [ 299 | 0 300 | ], 301 | "index": 12, 302 | "interface_index": 14, 303 | "ip_address": [ 304 | "10.0.0.2" 305 | ], 306 | "ip_connection_metric": 5, 307 | "ip_enabled": true, 308 | "ip_filter_security_enabled": false, 309 | "ip_sec_permit_ip_protocols": [ 310 | ], 311 | "ip_sec_permit_tcp_ports": [ 312 | ], 313 | "ip_sec_permit_udp_ports": [ 314 | ], 315 | "ip_subnet": [ 316 | "255.255.255.0", 317 | "64" 318 | ], 319 | "mac_address": "11:11:11:11:11:11", 320 | "service_name": "netkvm", 321 | "setting_id": "{00000000-0000-0000-0000-000000000000}", 322 | "tcp_window_size": 64240, 323 | "tcpip_netbios_options": 0, 324 | "wins_enable_lm_hosts_lookup": true, 325 | "wins_scope_id": "" 326 | }, 327 | "counters": { 328 | }, 329 | "encapsulation": "Ethernet", 330 | "instance": { 331 | "adapter_type": "Ethernet 802.3", 332 | "adapter_type_id": 0, 333 | "availability": 3, 334 | "caption": "[00000012] Ethernet Adapter", 335 | "config_manager_error_code": 0, 336 | "config_manager_user_config": false, 337 | "creation_class_name": "Win32_NetworkAdapter", 338 | "description": "Ethernet Adapter", 339 | "device_id": "12", 340 | "guid": "{00000000-0000-0000-0000-000000000000}", 341 | "index": 12, 342 | "installed": true, 343 | "interface_index": 14, 344 | "mac_address": "11:11:11:11:11:11", 345 | "manufacturer": "", 346 | "max_number_controlled": 0, 347 | "name": "Ethernet Adapter", 348 | "net_connection_id": "Ethernet", 349 | "net_connection_status": 2, 350 | "net_enabled": true, 351 | "physical_adapter": true, 352 | "pnp_device_id": "PCI\\VEN_0000&DEV_0000&SUBSYS_000000000&REV_00\\0&0000000000&00", 353 | "power_management_supported": false, 354 | "product_name": "Ethernet Adapter", 355 | "service_name": "netkvm", 356 | "speed": "10000000000", 357 | "system_creation_class_name": "Win32_ComputerSystem", 358 | "system_name": "Fauxhai", 359 | "time_of_last_reset": "20000101000001.000000+000" 360 | }, 361 | "type": "Ethernet 802.3" 362 | } 363 | } 364 | }, 365 | "ohai_time": 1548884496.1946921, 366 | "os": "windows", 367 | "os_version": "10.0.14393", 368 | "packages": { 369 | "AWS PV Drivers": { 370 | "installdate": "20181014", 371 | "publisher": "Amazon Web Services", 372 | "version": "8.2.4" 373 | }, 374 | "AWS Tools for Windows": { 375 | "installdate": "20190109", 376 | "publisher": "Amazon Web Services Developer Relations", 377 | "version": "3.15.647" 378 | }, 379 | "Amazon SSM Agent": { 380 | "publisher": "Amazon Web Services", 381 | "version": "2.3.344.0" 382 | }, 383 | "Chef Client v14.10.9": { 384 | "installdate": "20190130", 385 | "publisher": "Chef Software, Inc.", 386 | "version": "14.10.9.1" 387 | }, 388 | "aws-cfn-bootstrap": { 389 | "installdate": "20181014", 390 | "publisher": "Amazon Web Services", 391 | "version": "1.4.31" 392 | } 393 | }, 394 | "platform": "windows", 395 | "platform_family": "windows", 396 | "platform_version": "10.0.14393", 397 | "root_group": "Administrators", 398 | "shard_seed": 50557205, 399 | "time": { 400 | "timezone": "GMT" 401 | }, 402 | "uptime": "30 days 15 hours 07 minutes 30 seconds", 403 | "uptime_seconds": 2646450, 404 | "virtualization": { 405 | "systems": { 406 | } 407 | } 408 | } -------------------------------------------------------------------------------- /lib/fauxhai/platforms/windows/2019.json: -------------------------------------------------------------------------------- 1 | { 2 | "chef_packages": { 3 | "chef": { 4 | "chef_root": "C:/opscode/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.10.9-universal-mingw32/lib", 5 | "version": "14.10.9" 6 | }, 7 | "ohai": { 8 | "ohai_root": "C:/opscode/chef/embedded/lib/ruby/gems/2.5.0/gems/ohai-14.8.10/lib/ohai", 9 | "version": "14.8.10" 10 | } 11 | }, 12 | "command": { 13 | }, 14 | "counters": { 15 | "network": { 16 | "interfaces": { 17 | "0xe": { 18 | "rx": { 19 | "bytes": 0, 20 | "compressed": 0, 21 | "drop": 0, 22 | "errors": 0, 23 | "frame": 0, 24 | "multicast": 0, 25 | "overrun": 0, 26 | "packets": 0 27 | }, 28 | "tx": { 29 | "bytes": 0, 30 | "carrier": 0, 31 | "collisions": 0, 32 | "compressed": 0, 33 | "drop": 0, 34 | "errors": 0, 35 | "overrun": 0, 36 | "packets": 0 37 | } 38 | }, 39 | "lo": { 40 | "rx": { 41 | "bytes": 0, 42 | "drop": 0, 43 | "errors": 0, 44 | "overrun": 0, 45 | "packets": 0 46 | }, 47 | "tx": { 48 | "bytes": 0, 49 | "carrier": 0, 50 | "collisions": 0, 51 | "drop": 0, 52 | "errors": 0, 53 | "packets": 0, 54 | "queuelen": "1" 55 | } 56 | } 57 | } 58 | } 59 | }, 60 | "cpu": { 61 | "cores": 1, 62 | "real": 1, 63 | "total": 1 64 | }, 65 | "current_user": "fauxhai", 66 | "dmi": { 67 | }, 68 | "domain": "local", 69 | "filesystem": { 70 | "C:": { 71 | "fs_type": "ntfs", 72 | "kb_available": 16159379, 73 | "kb_size": 32210153, 74 | "kb_used": 16050774, 75 | "mount": "C:", 76 | "percent_used": 49, 77 | "volume_name": "" 78 | } 79 | }, 80 | "fips": { 81 | "kernel": { 82 | "enabled": false 83 | } 84 | }, 85 | "fqdn": "fauxhai.local", 86 | "hostname": "Fauxhai", 87 | "idle": "30 days 15 hours 07 minutes 30 seconds", 88 | "idletime_seconds": 2646450, 89 | "ipaddress": "10.0.0.2", 90 | "kernel": { 91 | "cs_info": { 92 | "admin_password_status": 3, 93 | "automatic_managed_pagefile": true, 94 | "automatic_reset_boot_option": true, 95 | "automatic_reset_capability": true, 96 | "boot_option_on_limit": null, 97 | "boot_option_on_watch_dog": null, 98 | "boot_rom_supported": true, 99 | "boot_status": null, 100 | "bootup_state": "Normal boot", 101 | "caption": "EC2AMAZ-9UNP6NI", 102 | "chassis_bootup_state": 3, 103 | "chassis_sku_number": null, 104 | "current_time_zone": 0, 105 | "daylight_in_effect": null, 106 | "description": "AT/AT COMPATIBLE", 107 | "dns_host_name": "EC2AMAZ-9UNP6NI", 108 | "domain": "WORKGROUP", 109 | "domain_role": 2, 110 | "enable_daylight_savings_time": true, 111 | "front_panel_reset_status": 3, 112 | "hypervisor_present": true, 113 | "infrared_supported": false, 114 | "initial_load_info": null, 115 | "install_date": null, 116 | "keyboard_password_status": 3, 117 | "last_load_info": null, 118 | "manufacturer": "Amazon EC2", 119 | "model": "t3.large", 120 | "name": "EC2AMAZ-9UNP6NI", 121 | "name_format": null, 122 | "network_server_mode_enabled": true, 123 | "number_of_logical_processors": 2, 124 | "number_of_processors": 1, 125 | "oem_string_array": null, 126 | "part_of_domain": false, 127 | "pause_after_reset": "-1", 128 | "pc_system_type": 1, 129 | "pc_system_type_ex": 1, 130 | "power_management_capabilities": null, 131 | "power_management_supported": null, 132 | "power_on_password_status": 3, 133 | "power_state": 0, 134 | "power_supply_state": 3, 135 | "primary_owner_contact": null, 136 | "primary_owner_name": "EC2", 137 | "reset_capability": 1, 138 | "reset_count": -1, 139 | "reset_limit": -1, 140 | "roles": [ 141 | "LM_Workstation", 142 | "LM_Server", 143 | "NT", 144 | "Server_NT" 145 | ], 146 | "status": "OK", 147 | "support_contact_description": null, 148 | "system_family": null, 149 | "system_sku_number": null, 150 | "system_startup_delay": null, 151 | "system_startup_options": null, 152 | "system_startup_setting": null, 153 | "system_type": "x64-based PC", 154 | "thermal_state": 3, 155 | "total_physical_memory": "8482549760", 156 | "user_name": null, 157 | "wake_up_type": 6, 158 | "workgroup": "WORKGROUP" 159 | }, 160 | "machine": "x86_64", 161 | "name": "Microsoft Windows Server 2019 Datacenter", 162 | "os": "WINNT", 163 | "os_info": { 164 | "boot_device": "\\Device\\HarddiskVolume1", 165 | "build_number": "17763", 166 | "build_type": "Multiprocessor Free", 167 | "caption": "Microsoft Windows Server 2019 Datacenter", 168 | "code_set": "1252", 169 | "country_code": "1", 170 | "cs_name": "EC2AMAZ-9UNP6NI", 171 | "csd_version": null, 172 | "current_time_zone": 0, 173 | "data_execution_prevention_32_bit_applications": true, 174 | "data_execution_prevention_available": true, 175 | "data_execution_prevention_drivers": true, 176 | "data_execution_prevention_support_policy": 3, 177 | "debug": false, 178 | "description": "", 179 | "distributed": false, 180 | "encryption_level": 256, 181 | "foreground_application_boost": 2, 182 | "install_date": "20190130203952.000000+000", 183 | "large_system_cache": null, 184 | "last_boot_up_time": "20190130212248.731068+000", 185 | "local_date_time": "20190130220631.648000+000", 186 | "locale": "0409", 187 | "manufacturer": "Microsoft Corporation", 188 | "max_number_of_processes": -1, 189 | "max_process_memory_size": "137438953344", 190 | "mui_languages": [ 191 | "en-US" 192 | ], 193 | "name": "Microsoft Windows Server 2019 Datacenter|C:\\Windows|\\Device\\Harddisk0\\Partition1", 194 | "number_of_licensed_users": 0, 195 | "number_of_processes": 100, 196 | "number_of_users": 1, 197 | "operating_system_sku": 8, 198 | "organization": "Amazon.com", 199 | "os_architecture": "64-bit", 200 | "os_language": 1033, 201 | "os_product_suite": 400, 202 | "os_type": 18, 203 | "other_type_description": null, 204 | "pae_enabled": null, 205 | "plus_product_id": null, 206 | "plus_version_number": null, 207 | "portable_operating_system": false, 208 | "primary": true, 209 | "product_type": 3, 210 | "registered_user": "EC2", 211 | "serial_number": "00430-00000-00000-AA974", 212 | "service_pack_major_version": 0, 213 | "service_pack_minor_version": 0, 214 | "size_stored_in_paging_files": "1966080", 215 | "status": "OK", 216 | "suite_mask": 400, 217 | "system_device": "\\Device\\HarddiskVolume1", 218 | "system_directory": "C:\\Windows\\system32", 219 | "system_drive": "C:", 220 | "total_visible_memory_size": "8283740", 221 | "version": "10.0.17763", 222 | "windows_directory": "C:\\Windows" 223 | }, 224 | "product_type": "Server", 225 | "release": "10.0.17763", 226 | "server_core": false, 227 | "system_type": "Desktop", 228 | "version": "10.0.17763 Build 17763" 229 | }, 230 | "keys": { 231 | "ssh": { 232 | "host_dsa_public": "ssh-dss AAAAB3NzaC1kc3MAAACBAJFo9BLAw4WKEs5hgipk5m423FzBsDXCZSMcC9ca/om/1VYzMqImixGe3uICDzNFUWxFoLJTQAOccyzo6MXZiQqwWJDLFi5qOSr6w2XcMyE+zd4wOyMoDiVM5fizmG8K3FzrqvGjwBcHcBdOQnavSijoj38DN25J9zhrid5BY4WlAAAAFQDxXrCyG52XCzn3FV4ej38wJBkomQAAAIBovGPJ4mP2P6BK8lHl0PPbktwQbWlpJ13oz6REJFDVcUi7vV26bX/BjQX+ohzZQzljdz1SpUbPc/8nuA4darYkVh91eBi307EN8IdxRHj2eBgp/ZG4yshIebG3WHrwJD/xUjjZ1MRfyDT1ermVi4LvjjPgWDxLZnPpMaR6S1nzgQAAAIEAj0Vd6DCWslvlsZ8+N53HWsqPi3gnx35JoLPz9Z2epkKIKqmEHav+93G3hdfztVa4I4t3phoPniQchYryF5+RNg8hqxKzjNtrIqUYCeuf2NJrksNsH7OZygPHZpqt4kTuwAGZxjxEGfAI0y8DhkU2ntp2LnzRnWH106BQBCmcXwo= fauxhai.local", 233 | "host_rsa_public": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCtLCeqtqr/HbnORckw1ukdLhpfGoOPFi5/esKEokzTqq1gsgQ2V8emmyjfq1i6XXfRtSBxkdlHv/GWdP5wBTuE2G85MzBkVSQPvmwQN8lX/JMPEEtKXkeOo0o92/PiSmvY4eRsdF0mw40Uvg7jtE3f3fxj497kzh5fKtkrHnF4x9gXCbVdr3FqXJfggR5IJwAxToerbK7x/uRS+7YuZI9Pip3tt14nv9ezwXcuGb/tvjWOZINiFl8izVIFKi7sxfTX09p4NgamxRS7TD2Yd0jT8nEoF9UZTsgXcJ1kDSx7N7NxFfNfP6rCdOGRRz4gUhXtsUjG/XkxPeCwZ7A9VnOD fauxhai.local" 234 | } 235 | }, 236 | "languages": { 237 | "powershell": { 238 | "build_version": "10.0.17763.134", 239 | "clr_version": "4.0.30319.42000", 240 | "compatible_versions": [ 241 | "1.0", 242 | "2.0", 243 | "3.0", 244 | "4.0", 245 | "5.0", 246 | "5.1.17763.134" 247 | ], 248 | "remoting_protocol_version": "2.3", 249 | "serialization_version": "1.1.0.1", 250 | "version": "5.1.17763.134", 251 | "ws_man_stack_version": "3.0" 252 | }, 253 | "ruby": { 254 | "bin_dir": "/usr/local/bin", 255 | "gem_bin": "/usr/local/bin/gem", 256 | "gems_dir": "/usr/local/gems", 257 | "ruby_bin": "/usr/local/bin/ruby" 258 | } 259 | }, 260 | "macaddress": "11:11:11:11:11:11", 261 | "machinename": "Fauxhai", 262 | "memory": { 263 | "total": "1048576kB" 264 | }, 265 | "network": { 266 | "default_gateway": "10.0.0.1", 267 | "default_interface": "0xe", 268 | "interfaces": { 269 | "0xe": { 270 | "addresses": { 271 | "10.0.0.2": { 272 | "broadcast": "10.0.0.255", 273 | "family": "inet", 274 | "netmask": "255.255.255.0", 275 | "prefixlen": "24" 276 | }, 277 | "11:11:11:11:11:11": { 278 | "family": "lladdr" 279 | } 280 | }, 281 | "arp": { 282 | "10.0.0.1": "fe:ff:ff:ff:ff:ff" 283 | }, 284 | "configuration": { 285 | "caption": "[00000012] Ethernet Adapter", 286 | "database_path": "%SystemRoot%\\System32\\drivers\\etc", 287 | "default_ip_gateway": [ 288 | "default_gateway" 289 | ], 290 | "description": "Ethernet Adapter", 291 | "dhcp_enabled": false, 292 | "dns_domain_suffix_search_order": [ 293 | ], 294 | "dns_enabled_for_wins_resolution": false, 295 | "dns_host_name": "Fauxhai", 296 | "domain_dns_registration_enabled": false, 297 | "full_dns_registration_enabled": true, 298 | "gateway_cost_metric": [ 299 | 0 300 | ], 301 | "index": 12, 302 | "interface_index": 14, 303 | "ip_address": [ 304 | "10.0.0.2" 305 | ], 306 | "ip_connection_metric": 5, 307 | "ip_enabled": true, 308 | "ip_filter_security_enabled": false, 309 | "ip_sec_permit_ip_protocols": [ 310 | ], 311 | "ip_sec_permit_tcp_ports": [ 312 | ], 313 | "ip_sec_permit_udp_ports": [ 314 | ], 315 | "ip_subnet": [ 316 | "255.255.255.0", 317 | "64" 318 | ], 319 | "mac_address": "11:11:11:11:11:11", 320 | "service_name": "netkvm", 321 | "setting_id": "{00000000-0000-0000-0000-000000000000}", 322 | "tcp_window_size": 64240, 323 | "tcpip_netbios_options": 0, 324 | "wins_enable_lm_hosts_lookup": true, 325 | "wins_scope_id": "" 326 | }, 327 | "counters": { 328 | }, 329 | "encapsulation": "Ethernet", 330 | "instance": { 331 | "adapter_type": "Ethernet 802.3", 332 | "adapter_type_id": 0, 333 | "availability": 3, 334 | "caption": "[00000012] Ethernet Adapter", 335 | "config_manager_error_code": 0, 336 | "config_manager_user_config": false, 337 | "creation_class_name": "Win32_NetworkAdapter", 338 | "description": "Ethernet Adapter", 339 | "device_id": "12", 340 | "guid": "{00000000-0000-0000-0000-000000000000}", 341 | "index": 12, 342 | "installed": true, 343 | "interface_index": 14, 344 | "mac_address": "11:11:11:11:11:11", 345 | "manufacturer": "", 346 | "max_number_controlled": 0, 347 | "name": "Ethernet Adapter", 348 | "net_connection_id": "Ethernet", 349 | "net_connection_status": 2, 350 | "net_enabled": true, 351 | "physical_adapter": true, 352 | "pnp_device_id": "PCI\\VEN_0000&DEV_0000&SUBSYS_000000000&REV_00\\0&0000000000&00", 353 | "power_management_supported": false, 354 | "product_name": "Ethernet Adapter", 355 | "service_name": "netkvm", 356 | "speed": "10000000000", 357 | "system_creation_class_name": "Win32_ComputerSystem", 358 | "system_name": "Fauxhai", 359 | "time_of_last_reset": "20000101000001.000000+000" 360 | }, 361 | "type": "Ethernet 802.3" 362 | } 363 | } 364 | }, 365 | "ohai_time": 1548885997.008522, 366 | "os": "windows", 367 | "os_version": "10.0.17763", 368 | "packages": { 369 | "AWS PV Drivers": { 370 | "installdate": "20181212", 371 | "publisher": "Amazon Web Services", 372 | "version": "8.2.4" 373 | }, 374 | "AWS Tools for Windows": { 375 | "installdate": "20190109", 376 | "publisher": "Amazon Web Services Developer Relations", 377 | "version": "3.15.647" 378 | }, 379 | "Amazon SSM Agent": { 380 | "publisher": "Amazon Web Services", 381 | "version": "2.3.344.0" 382 | }, 383 | "Chef Client v14.10.9": { 384 | "installdate": "20190130", 385 | "publisher": "Chef Software, Inc.", 386 | "version": "14.10.9.1" 387 | }, 388 | "aws-cfn-bootstrap": { 389 | "installdate": "20181212", 390 | "publisher": "Amazon Web Services", 391 | "version": "1.4.31" 392 | } 393 | }, 394 | "platform": "windows", 395 | "platform_family": "windows", 396 | "platform_version": "10.0.17763", 397 | "root_group": "Administrators", 398 | "shard_seed": 150228569, 399 | "time": { 400 | "timezone": "GMT" 401 | }, 402 | "uptime": "30 days 15 hours 07 minutes 30 seconds", 403 | "uptime_seconds": 2646450, 404 | "virtualization": { 405 | "systems": { 406 | } 407 | } 408 | } -------------------------------------------------------------------------------- /lib/fauxhai/platforms/windows/8.1.json: -------------------------------------------------------------------------------- 1 | { 2 | "chef_packages": { 3 | "chef": { 4 | "chef_root": "C:/opscode/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.10.9-universal-mingw32/lib", 5 | "version": "14.10.9" 6 | }, 7 | "ohai": { 8 | "ohai_root": "C:/opscode/chef/embedded/lib/ruby/gems/2.5.0/gems/ohai-14.8.10/lib/ohai", 9 | "version": "14.8.10" 10 | } 11 | }, 12 | "command": { 13 | }, 14 | "counters": { 15 | "network": { 16 | "interfaces": { 17 | "0xe": { 18 | "rx": { 19 | "bytes": 0, 20 | "compressed": 0, 21 | "drop": 0, 22 | "errors": 0, 23 | "frame": 0, 24 | "multicast": 0, 25 | "overrun": 0, 26 | "packets": 0 27 | }, 28 | "tx": { 29 | "bytes": 0, 30 | "carrier": 0, 31 | "collisions": 0, 32 | "compressed": 0, 33 | "drop": 0, 34 | "errors": 0, 35 | "overrun": 0, 36 | "packets": 0 37 | } 38 | }, 39 | "lo": { 40 | "rx": { 41 | "bytes": 0, 42 | "drop": 0, 43 | "errors": 0, 44 | "overrun": 0, 45 | "packets": 0 46 | }, 47 | "tx": { 48 | "bytes": 0, 49 | "carrier": 0, 50 | "collisions": 0, 51 | "drop": 0, 52 | "errors": 0, 53 | "packets": 0, 54 | "queuelen": "1" 55 | } 56 | } 57 | } 58 | } 59 | }, 60 | "cpu": { 61 | "cores": 1, 62 | "real": 1, 63 | "total": 1 64 | }, 65 | "current_user": "fauxhai", 66 | "dmi": { 67 | }, 68 | "domain": "local", 69 | "filesystem": { 70 | "A:": { 71 | "fs_type": "", 72 | "kb_available": 0, 73 | "kb_size": 0, 74 | "kb_used": 0, 75 | "mount": "A:", 76 | "percent_used": 0, 77 | "volume_name": "" 78 | }, 79 | "C:": { 80 | "fs_type": "ntfs", 81 | "kb_available": 119364108, 82 | "kb_size": 137436852, 83 | "kb_used": 18072744, 84 | "mount": "C:", 85 | "percent_used": 13, 86 | "volume_name": "" 87 | }, 88 | "D:": { 89 | "encryption_status": "FullyDecrypted", 90 | "fs_type": "ntfs", 91 | "kb_available": 51567525, 92 | "kb_size": 53685972, 93 | "kb_used": 2118447, 94 | "mount": "D:", 95 | "percent_used": 3, 96 | "volume_name": "temporary storage" 97 | }, 98 | "E:": { 99 | "fs_type": "", 100 | "kb_available": 0, 101 | "kb_size": 0, 102 | "kb_used": 0, 103 | "mount": "E:", 104 | "percent_used": 0, 105 | "volume_name": "" 106 | } 107 | }, 108 | "fips": { 109 | "kernel": { 110 | "enabled": false 111 | } 112 | }, 113 | "fqdn": "fauxhai.local", 114 | "hostname": "Fauxhai", 115 | "idle": "30 days 15 hours 07 minutes 30 seconds", 116 | "idletime_seconds": 2646450, 117 | "ipaddress": "10.0.0.2", 118 | "kernel": { 119 | "cs_info": { 120 | "admin_password_status": 3, 121 | "automatic_managed_pagefile": false, 122 | "automatic_reset_boot_option": true, 123 | "automatic_reset_capability": true, 124 | "boot_option_on_limit": 0, 125 | "boot_option_on_watch_dog": 0, 126 | "boot_rom_supported": true, 127 | "bootup_state": "Normal boot", 128 | "caption": "win81", 129 | "chassis_bootup_state": 3, 130 | "current_time_zone": 0, 131 | "daylight_in_effect": null, 132 | "description": "AT/AT COMPATIBLE", 133 | "dns_host_name": "win81", 134 | "domain": "WORKGROUP", 135 | "domain_role": 0, 136 | "enable_daylight_savings_time": true, 137 | "front_panel_reset_status": 3, 138 | "hypervisor_present": true, 139 | "infrared_supported": false, 140 | "initial_load_info": null, 141 | "install_date": null, 142 | "keyboard_password_status": 3, 143 | "last_load_info": null, 144 | "manufacturer": "Microsoft Corporation", 145 | "model": "Virtual Machine", 146 | "name": "win81", 147 | "name_format": null, 148 | "network_server_mode_enabled": true, 149 | "number_of_logical_processors": 2, 150 | "number_of_processors": 1, 151 | "oem_string_array": [ 152 | "[MS_VM_CERT/SHA1/9b80ca0d5dd061ec9da4e494f4c3fd1196270c22]", 153 | "00000000000000000000000000000000", 154 | "To be filed by MSFT" 155 | ], 156 | "part_of_domain": false, 157 | "pause_after_reset": "3932100000", 158 | "pc_system_type": 1, 159 | "pc_system_type_ex": 1, 160 | "power_management_capabilities": null, 161 | "power_management_supported": null, 162 | "power_on_password_status": 3, 163 | "power_state": 0, 164 | "power_supply_state": 3, 165 | "primary_owner_contact": null, 166 | "primary_owner_name": "Windows User", 167 | "reset_capability": 1, 168 | "reset_count": -1, 169 | "reset_limit": -1, 170 | "roles": [ 171 | "LM_Workstation", 172 | "LM_Server", 173 | "NT" 174 | ], 175 | "status": "OK", 176 | "support_contact_description": null, 177 | "system_startup_delay": null, 178 | "system_startup_options": null, 179 | "system_startup_setting": null, 180 | "system_type": "x64-based PC", 181 | "thermal_state": 1, 182 | "total_physical_memory": "8589463552", 183 | "user_name": null, 184 | "wake_up_type": 6, 185 | "workgroup": "WORKGROUP" 186 | }, 187 | "machine": "x86_64", 188 | "name": "Microsoft Windows 8.1 Enterprise N", 189 | "os": "WINNT", 190 | "os_info": { 191 | "boot_device": "\\Device\\HarddiskVolume1", 192 | "build_number": "9600", 193 | "build_type": "Multiprocessor Free", 194 | "caption": "Microsoft Windows 8.1 Enterprise N", 195 | "code_set": "1252", 196 | "country_code": "1", 197 | "cs_name": "win81", 198 | "csd_version": null, 199 | "current_time_zone": 0, 200 | "data_execution_prevention_32_bit_applications": true, 201 | "data_execution_prevention_available": true, 202 | "data_execution_prevention_drivers": true, 203 | "data_execution_prevention_support_policy": 2, 204 | "debug": false, 205 | "description": "", 206 | "distributed": false, 207 | "encryption_level": 256, 208 | "foreground_application_boost": 2, 209 | "install_date": "20190130214616.000000+000", 210 | "large_system_cache": null, 211 | "last_boot_up_time": "20190130214440.541330+000", 212 | "local_date_time": "20190130220322.654000+000", 213 | "locale": "0409", 214 | "manufacturer": "Microsoft Corporation", 215 | "max_number_of_processes": -1, 216 | "max_process_memory_size": "137438953344", 217 | "mui_languages": [ 218 | "en-US" 219 | ], 220 | "name": "Microsoft Windows 8.1 Enterprise N|C:\\Windows|\\Device\\Harddisk0\\Partition1", 221 | "number_of_licensed_users": 0, 222 | "number_of_processes": 60, 223 | "number_of_users": 2, 224 | "operating_system_sku": 27, 225 | "organization": "", 226 | "os_architecture": "64-bit", 227 | "os_language": 1033, 228 | "os_product_suite": 256, 229 | "os_type": 18, 230 | "other_type_description": null, 231 | "pae_enabled": null, 232 | "plus_product_id": null, 233 | "plus_version_number": null, 234 | "portable_operating_system": false, 235 | "primary": true, 236 | "product_type": 1, 237 | "registered_user": "Windows User", 238 | "serial_number": "00261-40000-00000-AA383", 239 | "service_pack_major_version": 0, 240 | "service_pack_minor_version": 0, 241 | "size_stored_in_paging_files": "1966080", 242 | "status": "OK", 243 | "suite_mask": 272, 244 | "system_device": "\\Device\\HarddiskVolume1", 245 | "system_directory": "C:\\Windows\\system32", 246 | "system_drive": "C:", 247 | "total_visible_memory_size": "8388148", 248 | "version": "6.3.9600", 249 | "windows_directory": "C:\\Windows" 250 | }, 251 | "product_type": "Workstation", 252 | "release": "6.3.9600", 253 | "server_core": false, 254 | "system_type": "Desktop", 255 | "version": "6.3.9600 Build 9600" 256 | }, 257 | "keys": { 258 | "ssh": { 259 | "host_dsa_public": "ssh-dss AAAAB3NzaC1kc3MAAACBAJFo9BLAw4WKEs5hgipk5m423FzBsDXCZSMcC9ca/om/1VYzMqImixGe3uICDzNFUWxFoLJTQAOccyzo6MXZiQqwWJDLFi5qOSr6w2XcMyE+zd4wOyMoDiVM5fizmG8K3FzrqvGjwBcHcBdOQnavSijoj38DN25J9zhrid5BY4WlAAAAFQDxXrCyG52XCzn3FV4ej38wJBkomQAAAIBovGPJ4mP2P6BK8lHl0PPbktwQbWlpJ13oz6REJFDVcUi7vV26bX/BjQX+ohzZQzljdz1SpUbPc/8nuA4darYkVh91eBi307EN8IdxRHj2eBgp/ZG4yshIebG3WHrwJD/xUjjZ1MRfyDT1ermVi4LvjjPgWDxLZnPpMaR6S1nzgQAAAIEAj0Vd6DCWslvlsZ8+N53HWsqPi3gnx35JoLPz9Z2epkKIKqmEHav+93G3hdfztVa4I4t3phoPniQchYryF5+RNg8hqxKzjNtrIqUYCeuf2NJrksNsH7OZygPHZpqt4kTuwAGZxjxEGfAI0y8DhkU2ntp2LnzRnWH106BQBCmcXwo= fauxhai.local", 260 | "host_rsa_public": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCtLCeqtqr/HbnORckw1ukdLhpfGoOPFi5/esKEokzTqq1gsgQ2V8emmyjfq1i6XXfRtSBxkdlHv/GWdP5wBTuE2G85MzBkVSQPvmwQN8lX/JMPEEtKXkeOo0o92/PiSmvY4eRsdF0mw40Uvg7jtE3f3fxj497kzh5fKtkrHnF4x9gXCbVdr3FqXJfggR5IJwAxToerbK7x/uRS+7YuZI9Pip3tt14nv9ezwXcuGb/tvjWOZINiFl8izVIFKi7sxfTX09p4NgamxRS7TD2Yd0jT8nEoF9UZTsgXcJ1kDSx7N7NxFfNfP6rCdOGRRz4gUhXtsUjG/XkxPeCwZ7A9VnOD fauxhai.local" 261 | } 262 | }, 263 | "languages": { 264 | "powershell": { 265 | "build_version": "10.0.14409.1018", 266 | "clr_version": "4.0.30319.42000", 267 | "compatible_versions": [ 268 | "1.0", 269 | "2.0", 270 | "3.0", 271 | "4.0", 272 | "5.0", 273 | "5.1.14409.1018" 274 | ], 275 | "remoting_protocol_version": "2.3", 276 | "serialization_version": "1.1.0.1", 277 | "version": "5.1.14409.1018", 278 | "ws_man_stack_version": "3.0" 279 | }, 280 | "ruby": { 281 | "bin_dir": "/usr/local/bin", 282 | "gem_bin": "/usr/local/bin/gem", 283 | "gems_dir": "/usr/local/gems", 284 | "ruby_bin": "/usr/local/bin/ruby" 285 | } 286 | }, 287 | "macaddress": "11:11:11:11:11:11", 288 | "machinename": "Fauxhai", 289 | "memory": { 290 | "total": "1048576kB" 291 | }, 292 | "network": { 293 | "default_gateway": "10.0.0.1", 294 | "default_interface": "0xe", 295 | "interfaces": { 296 | "0xe": { 297 | "addresses": { 298 | "10.0.0.2": { 299 | "broadcast": "10.0.0.255", 300 | "family": "inet", 301 | "netmask": "255.255.255.0", 302 | "prefixlen": "24" 303 | }, 304 | "11:11:11:11:11:11": { 305 | "family": "lladdr" 306 | } 307 | }, 308 | "arp": { 309 | "10.0.0.1": "fe:ff:ff:ff:ff:ff" 310 | }, 311 | "configuration": { 312 | "caption": "[00000012] Ethernet Adapter", 313 | "database_path": "%SystemRoot%\\System32\\drivers\\etc", 314 | "default_ip_gateway": [ 315 | "default_gateway" 316 | ], 317 | "description": "Ethernet Adapter", 318 | "dhcp_enabled": false, 319 | "dns_domain_suffix_search_order": [ 320 | ], 321 | "dns_enabled_for_wins_resolution": false, 322 | "dns_host_name": "Fauxhai", 323 | "domain_dns_registration_enabled": false, 324 | "full_dns_registration_enabled": true, 325 | "gateway_cost_metric": [ 326 | 0 327 | ], 328 | "index": 12, 329 | "interface_index": 14, 330 | "ip_address": [ 331 | "10.0.0.2" 332 | ], 333 | "ip_connection_metric": 5, 334 | "ip_enabled": true, 335 | "ip_filter_security_enabled": false, 336 | "ip_sec_permit_ip_protocols": [ 337 | ], 338 | "ip_sec_permit_tcp_ports": [ 339 | ], 340 | "ip_sec_permit_udp_ports": [ 341 | ], 342 | "ip_subnet": [ 343 | "255.255.255.0", 344 | "64" 345 | ], 346 | "mac_address": "11:11:11:11:11:11", 347 | "service_name": "netkvm", 348 | "setting_id": "{00000000-0000-0000-0000-000000000000}", 349 | "tcp_window_size": 64240, 350 | "tcpip_netbios_options": 0, 351 | "wins_enable_lm_hosts_lookup": true, 352 | "wins_scope_id": "" 353 | }, 354 | "counters": { 355 | }, 356 | "encapsulation": "Ethernet", 357 | "instance": { 358 | "adapter_type": "Ethernet 802.3", 359 | "adapter_type_id": 0, 360 | "availability": 3, 361 | "caption": "[00000012] Ethernet Adapter", 362 | "config_manager_error_code": 0, 363 | "config_manager_user_config": false, 364 | "creation_class_name": "Win32_NetworkAdapter", 365 | "description": "Ethernet Adapter", 366 | "device_id": "12", 367 | "guid": "{00000000-0000-0000-0000-000000000000}", 368 | "index": 12, 369 | "installed": true, 370 | "interface_index": 14, 371 | "mac_address": "11:11:11:11:11:11", 372 | "manufacturer": "", 373 | "max_number_controlled": 0, 374 | "name": "Ethernet Adapter", 375 | "net_connection_id": "Ethernet", 376 | "net_connection_status": 2, 377 | "net_enabled": true, 378 | "physical_adapter": true, 379 | "pnp_device_id": "PCI\\VEN_0000&DEV_0000&SUBSYS_000000000&REV_00\\0&0000000000&00", 380 | "power_management_supported": false, 381 | "product_name": "Ethernet Adapter", 382 | "service_name": "netkvm", 383 | "speed": "10000000000", 384 | "system_creation_class_name": "Win32_ComputerSystem", 385 | "system_name": "Fauxhai", 386 | "time_of_last_reset": "20000101000001.000000+000" 387 | }, 388 | "type": "Ethernet 802.3" 389 | } 390 | } 391 | }, 392 | "ohai_time": 1548885810.973912, 393 | "os": "windows", 394 | "os_version": "6.3.9600", 395 | "packages": { 396 | "Chef Client v14.10.9": { 397 | "installdate": "20190130", 398 | "publisher": "Chef Software, Inc.", 399 | "version": "14.10.9.1" 400 | } 401 | }, 402 | "platform": "windows", 403 | "platform_family": "windows", 404 | "platform_version": "6.3.9600", 405 | "root_group": "Administrators", 406 | "shard_seed": 176560041, 407 | "time": { 408 | "timezone": "GMT" 409 | }, 410 | "uptime": "30 days 15 hours 07 minutes 30 seconds", 411 | "uptime_seconds": 2646450, 412 | "virtualization": { 413 | "systems": { 414 | } 415 | } 416 | } -------------------------------------------------------------------------------- /lib/fauxhai/platforms/windows/10.json: -------------------------------------------------------------------------------- 1 | { 2 | "chef_packages": { 3 | "chef": { 4 | "chef_root": "C:/opscode/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.10.9-universal-mingw32/lib", 5 | "version": "14.10.9" 6 | }, 7 | "ohai": { 8 | "ohai_root": "C:/opscode/chef/embedded/lib/ruby/gems/2.5.0/gems/ohai-14.8.10/lib/ohai", 9 | "version": "14.8.10" 10 | } 11 | }, 12 | "command": { 13 | }, 14 | "counters": { 15 | "network": { 16 | "interfaces": { 17 | "0xe": { 18 | "rx": { 19 | "bytes": 0, 20 | "compressed": 0, 21 | "drop": 0, 22 | "errors": 0, 23 | "frame": 0, 24 | "multicast": 0, 25 | "overrun": 0, 26 | "packets": 0 27 | }, 28 | "tx": { 29 | "bytes": 0, 30 | "carrier": 0, 31 | "collisions": 0, 32 | "compressed": 0, 33 | "drop": 0, 34 | "errors": 0, 35 | "overrun": 0, 36 | "packets": 0 37 | } 38 | }, 39 | "lo": { 40 | "rx": { 41 | "bytes": 0, 42 | "drop": 0, 43 | "errors": 0, 44 | "overrun": 0, 45 | "packets": 0 46 | }, 47 | "tx": { 48 | "bytes": 0, 49 | "carrier": 0, 50 | "collisions": 0, 51 | "drop": 0, 52 | "errors": 0, 53 | "packets": 0, 54 | "queuelen": "1" 55 | } 56 | } 57 | } 58 | } 59 | }, 60 | "cpu": { 61 | "cores": 1, 62 | "real": 1, 63 | "total": 1 64 | }, 65 | "current_user": "fauxhai", 66 | "dmi": { 67 | }, 68 | "domain": "local", 69 | "filesystem": { 70 | "A:": { 71 | "fs_type": "", 72 | "kb_available": 0, 73 | "kb_size": 0, 74 | "kb_used": 0, 75 | "mount": "A:", 76 | "percent_used": 0, 77 | "volume_name": "" 78 | }, 79 | "C:": { 80 | "fs_type": "ntfs", 81 | "kb_available": 122320953, 82 | "kb_size": 136363110, 83 | "kb_used": 14042157, 84 | "mount": "C:", 85 | "percent_used": 10, 86 | "volume_name": "" 87 | }, 88 | "D:": { 89 | "encryption_status": "FullyDecrypted", 90 | "fs_type": "ntfs", 91 | "kb_available": 51570606, 92 | "kb_size": 53685972, 93 | "kb_used": 2115366, 94 | "mount": "D:", 95 | "percent_used": 3, 96 | "volume_name": "temporary storage" 97 | }, 98 | "E:": { 99 | "fs_type": "", 100 | "kb_available": 0, 101 | "kb_size": 0, 102 | "kb_used": 0, 103 | "mount": "E:", 104 | "percent_used": 0, 105 | "volume_name": "" 106 | } 107 | }, 108 | "fips": { 109 | "kernel": { 110 | "enabled": false 111 | } 112 | }, 113 | "fqdn": "fauxhai.local", 114 | "hostname": "Fauxhai", 115 | "idle": "30 days 15 hours 07 minutes 30 seconds", 116 | "idletime_seconds": 2646450, 117 | "ipaddress": "10.0.0.2", 118 | "kernel": { 119 | "cs_info": { 120 | "admin_password_status": 3, 121 | "automatic_managed_pagefile": false, 122 | "automatic_reset_boot_option": true, 123 | "automatic_reset_capability": true, 124 | "boot_option_on_limit": 0, 125 | "boot_option_on_watch_dog": 0, 126 | "boot_rom_supported": true, 127 | "boot_status": [ 128 | 0, 129 | 0, 130 | 0, 131 | 0, 132 | 0, 133 | 0, 134 | 0, 135 | 0, 136 | 0, 137 | 0 138 | ], 139 | "bootup_state": "Normal boot", 140 | "caption": "win10", 141 | "chassis_bootup_state": 3, 142 | "chassis_sku_number": null, 143 | "current_time_zone": 0, 144 | "daylight_in_effect": null, 145 | "description": "AT/AT COMPATIBLE", 146 | "dns_host_name": "win10", 147 | "domain": "WORKGROUP", 148 | "domain_role": 0, 149 | "enable_daylight_savings_time": true, 150 | "front_panel_reset_status": 3, 151 | "hypervisor_present": true, 152 | "infrared_supported": false, 153 | "initial_load_info": null, 154 | "install_date": null, 155 | "keyboard_password_status": 3, 156 | "last_load_info": null, 157 | "manufacturer": "Microsoft Corporation", 158 | "model": "Virtual Machine", 159 | "name": "win10", 160 | "name_format": null, 161 | "network_server_mode_enabled": true, 162 | "number_of_logical_processors": 2, 163 | "number_of_processors": 1, 164 | "oem_string_array": [ 165 | "[MS_VM_CERT/SHA1/9b80ca0d5dd061ec9da4e494f4c3fd1196270c22]", 166 | "00000000000000000000000000000000", 167 | "To be filed by MSFT" 168 | ], 169 | "part_of_domain": false, 170 | "pause_after_reset": "3932100000", 171 | "pc_system_type": 1, 172 | "pc_system_type_ex": 1, 173 | "power_management_capabilities": null, 174 | "power_management_supported": null, 175 | "power_on_password_status": 3, 176 | "power_state": 0, 177 | "power_supply_state": 3, 178 | "primary_owner_contact": null, 179 | "primary_owner_name": null, 180 | "reset_capability": 1, 181 | "reset_count": -1, 182 | "reset_limit": -1, 183 | "roles": [ 184 | "LM_Workstation", 185 | "LM_Server", 186 | "NT" 187 | ], 188 | "status": "OK", 189 | "support_contact_description": null, 190 | "system_family": null, 191 | "system_sku_number": null, 192 | "system_startup_delay": null, 193 | "system_startup_options": null, 194 | "system_startup_setting": null, 195 | "system_type": "x64-based PC", 196 | "thermal_state": 1, 197 | "total_physical_memory": "8589463552", 198 | "user_name": null, 199 | "wake_up_type": 6, 200 | "workgroup": "WORKGROUP" 201 | }, 202 | "machine": "x86_64", 203 | "name": "Microsoft Windows 10 Education N", 204 | "os": "WINNT", 205 | "os_info": { 206 | "boot_device": "\\Device\\HarddiskVolume1", 207 | "build_number": "17763", 208 | "build_type": "Multiprocessor Free", 209 | "caption": "Microsoft Windows 10 Education N", 210 | "code_set": "1252", 211 | "country_code": "1", 212 | "cs_name": "win10", 213 | "csd_version": null, 214 | "current_time_zone": 0, 215 | "data_execution_prevention_32_bit_applications": true, 216 | "data_execution_prevention_available": true, 217 | "data_execution_prevention_drivers": true, 218 | "data_execution_prevention_support_policy": 2, 219 | "debug": false, 220 | "description": "", 221 | "distributed": false, 222 | "encryption_level": 256, 223 | "foreground_application_boost": 2, 224 | "install_date": "20190130214734.000000+000", 225 | "large_system_cache": null, 226 | "last_boot_up_time": "20190130214257.459403+000", 227 | "local_date_time": "20190130221336.518000+000", 228 | "locale": "0409", 229 | "manufacturer": "Microsoft Corporation", 230 | "max_number_of_processes": -1, 231 | "max_process_memory_size": "137438953344", 232 | "mui_languages": [ 233 | "en-US" 234 | ], 235 | "name": "Microsoft Windows 10 Education N|C:\\Windows|\\Device\\Harddisk0\\Partition1", 236 | "number_of_licensed_users": 0, 237 | "number_of_processes": 159, 238 | "number_of_users": 1, 239 | "operating_system_sku": 122, 240 | "organization": null, 241 | "os_architecture": "64-bit", 242 | "os_language": 1033, 243 | "os_product_suite": 256, 244 | "os_type": 18, 245 | "other_type_description": null, 246 | "pae_enabled": null, 247 | "plus_product_id": null, 248 | "plus_version_number": null, 249 | "portable_operating_system": false, 250 | "primary": true, 251 | "product_type": 1, 252 | "registered_user": null, 253 | "serial_number": "00328-60000-00001-AA228", 254 | "service_pack_major_version": 0, 255 | "service_pack_minor_version": 0, 256 | "size_stored_in_paging_files": "1966080", 257 | "status": "OK", 258 | "suite_mask": 272, 259 | "system_device": "\\Device\\HarddiskVolume1", 260 | "system_directory": "C:\\Windows\\system32", 261 | "system_drive": "C:", 262 | "total_visible_memory_size": "8388148", 263 | "version": "10.0.17763", 264 | "windows_directory": "C:\\Windows" 265 | }, 266 | "product_type": "Workstation", 267 | "release": "10.0.17763", 268 | "server_core": false, 269 | "system_type": "Desktop", 270 | "version": "10.0.17763 Build 17763" 271 | }, 272 | "keys": { 273 | "ssh": { 274 | "host_dsa_public": "ssh-dss AAAAB3NzaC1kc3MAAACBAJFo9BLAw4WKEs5hgipk5m423FzBsDXCZSMcC9ca/om/1VYzMqImixGe3uICDzNFUWxFoLJTQAOccyzo6MXZiQqwWJDLFi5qOSr6w2XcMyE+zd4wOyMoDiVM5fizmG8K3FzrqvGjwBcHcBdOQnavSijoj38DN25J9zhrid5BY4WlAAAAFQDxXrCyG52XCzn3FV4ej38wJBkomQAAAIBovGPJ4mP2P6BK8lHl0PPbktwQbWlpJ13oz6REJFDVcUi7vV26bX/BjQX+ohzZQzljdz1SpUbPc/8nuA4darYkVh91eBi307EN8IdxRHj2eBgp/ZG4yshIebG3WHrwJD/xUjjZ1MRfyDT1ermVi4LvjjPgWDxLZnPpMaR6S1nzgQAAAIEAj0Vd6DCWslvlsZ8+N53HWsqPi3gnx35JoLPz9Z2epkKIKqmEHav+93G3hdfztVa4I4t3phoPniQchYryF5+RNg8hqxKzjNtrIqUYCeuf2NJrksNsH7OZygPHZpqt4kTuwAGZxjxEGfAI0y8DhkU2ntp2LnzRnWH106BQBCmcXwo= fauxhai.local", 275 | "host_rsa_public": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCtLCeqtqr/HbnORckw1ukdLhpfGoOPFi5/esKEokzTqq1gsgQ2V8emmyjfq1i6XXfRtSBxkdlHv/GWdP5wBTuE2G85MzBkVSQPvmwQN8lX/JMPEEtKXkeOo0o92/PiSmvY4eRsdF0mw40Uvg7jtE3f3fxj497kzh5fKtkrHnF4x9gXCbVdr3FqXJfggR5IJwAxToerbK7x/uRS+7YuZI9Pip3tt14nv9ezwXcuGb/tvjWOZINiFl8izVIFKi7sxfTX09p4NgamxRS7TD2Yd0jT8nEoF9UZTsgXcJ1kDSx7N7NxFfNfP6rCdOGRRz4gUhXtsUjG/XkxPeCwZ7A9VnOD fauxhai.local" 276 | } 277 | }, 278 | "languages": { 279 | "powershell": { 280 | "build_version": "10.0.17763.134", 281 | "clr_version": "4.0.30319.42000", 282 | "compatible_versions": [ 283 | "1.0", 284 | "2.0", 285 | "3.0", 286 | "4.0", 287 | "5.0", 288 | "5.1.17763.134" 289 | ], 290 | "remoting_protocol_version": "2.3", 291 | "serialization_version": "1.1.0.1", 292 | "version": "5.1.17763.134", 293 | "ws_man_stack_version": "3.0" 294 | }, 295 | "ruby": { 296 | "bin_dir": "/usr/local/bin", 297 | "gem_bin": "/usr/local/bin/gem", 298 | "gems_dir": "/usr/local/gems", 299 | "ruby_bin": "/usr/local/bin/ruby" 300 | } 301 | }, 302 | "macaddress": "11:11:11:11:11:11", 303 | "machinename": "Fauxhai", 304 | "memory": { 305 | "total": "1048576kB" 306 | }, 307 | "network": { 308 | "default_gateway": "10.0.0.1", 309 | "default_interface": "0xe", 310 | "interfaces": { 311 | "0xe": { 312 | "addresses": { 313 | "10.0.0.2": { 314 | "broadcast": "10.0.0.255", 315 | "family": "inet", 316 | "netmask": "255.255.255.0", 317 | "prefixlen": "24" 318 | }, 319 | "11:11:11:11:11:11": { 320 | "family": "lladdr" 321 | } 322 | }, 323 | "arp": { 324 | "10.0.0.1": "fe:ff:ff:ff:ff:ff" 325 | }, 326 | "configuration": { 327 | "caption": "[00000012] Ethernet Adapter", 328 | "database_path": "%SystemRoot%\\System32\\drivers\\etc", 329 | "default_ip_gateway": [ 330 | "default_gateway" 331 | ], 332 | "description": "Ethernet Adapter", 333 | "dhcp_enabled": false, 334 | "dns_domain_suffix_search_order": [ 335 | ], 336 | "dns_enabled_for_wins_resolution": false, 337 | "dns_host_name": "Fauxhai", 338 | "domain_dns_registration_enabled": false, 339 | "full_dns_registration_enabled": true, 340 | "gateway_cost_metric": [ 341 | 0 342 | ], 343 | "index": 12, 344 | "interface_index": 14, 345 | "ip_address": [ 346 | "10.0.0.2" 347 | ], 348 | "ip_connection_metric": 5, 349 | "ip_enabled": true, 350 | "ip_filter_security_enabled": false, 351 | "ip_sec_permit_ip_protocols": [ 352 | ], 353 | "ip_sec_permit_tcp_ports": [ 354 | ], 355 | "ip_sec_permit_udp_ports": [ 356 | ], 357 | "ip_subnet": [ 358 | "255.255.255.0", 359 | "64" 360 | ], 361 | "mac_address": "11:11:11:11:11:11", 362 | "service_name": "netkvm", 363 | "setting_id": "{00000000-0000-0000-0000-000000000000}", 364 | "tcp_window_size": 64240, 365 | "tcpip_netbios_options": 0, 366 | "wins_enable_lm_hosts_lookup": true, 367 | "wins_scope_id": "" 368 | }, 369 | "counters": { 370 | }, 371 | "encapsulation": "Ethernet", 372 | "instance": { 373 | "adapter_type": "Ethernet 802.3", 374 | "adapter_type_id": 0, 375 | "availability": 3, 376 | "caption": "[00000012] Ethernet Adapter", 377 | "config_manager_error_code": 0, 378 | "config_manager_user_config": false, 379 | "creation_class_name": "Win32_NetworkAdapter", 380 | "description": "Ethernet Adapter", 381 | "device_id": "12", 382 | "guid": "{00000000-0000-0000-0000-000000000000}", 383 | "index": 12, 384 | "installed": true, 385 | "interface_index": 14, 386 | "mac_address": "11:11:11:11:11:11", 387 | "manufacturer": "", 388 | "max_number_controlled": 0, 389 | "name": "Ethernet Adapter", 390 | "net_connection_id": "Ethernet", 391 | "net_connection_status": 2, 392 | "net_enabled": true, 393 | "physical_adapter": true, 394 | "pnp_device_id": "PCI\\VEN_0000&DEV_0000&SUBSYS_000000000&REV_00\\0&0000000000&00", 395 | "power_management_supported": false, 396 | "product_name": "Ethernet Adapter", 397 | "service_name": "netkvm", 398 | "speed": "10000000000", 399 | "system_creation_class_name": "Win32_ComputerSystem", 400 | "system_name": "Fauxhai", 401 | "time_of_last_reset": "20000101000001.000000+000" 402 | }, 403 | "type": "Ethernet 802.3" 404 | } 405 | } 406 | }, 407 | "ohai_time": 1548886420.420179, 408 | "os": "windows", 409 | "os_version": "10.0.17763", 410 | "packages": { 411 | "Chef Client v14.10.9": { 412 | "installdate": "20190130", 413 | "publisher": "Chef Software, Inc.", 414 | "version": "14.10.9.1" 415 | } 416 | }, 417 | "platform": "windows", 418 | "platform_family": "windows", 419 | "platform_version": "10.0.17763", 420 | "root_group": "Administrators", 421 | "shard_seed": 111319863, 422 | "time": { 423 | "timezone": "GMT" 424 | }, 425 | "uptime": "30 days 15 hours 07 minutes 30 seconds", 426 | "uptime_seconds": 2646450, 427 | "virtualization": { 428 | "systems": { 429 | } 430 | } 431 | } -------------------------------------------------------------------------------- /lib/fauxhai/platforms/freebsd/12.1.json: -------------------------------------------------------------------------------- 1 | { 2 | "chef_packages": { 3 | "ohai": { 4 | "ohai_root": "/usr/local/lib/ruby/gems/2.6/gems/ohai-15.6.3/lib/ohai", 5 | "version": "15.6.3" 6 | } 7 | }, 8 | "command": { 9 | "ps": "ps -axww" 10 | }, 11 | "counters": { 12 | "network": { 13 | "interfaces": { 14 | "em0": { 15 | "rx": { 16 | "bytes": 0, 17 | "compressed": 0, 18 | "drop": 0, 19 | "errors": 0, 20 | "frame": 0, 21 | "multicast": 0, 22 | "overrun": 0, 23 | "packets": 0 24 | }, 25 | "tx": { 26 | "bytes": 0, 27 | "carrier": 0, 28 | "collisions": 0, 29 | "compressed": 0, 30 | "drop": 0, 31 | "errors": 0, 32 | "overrun": 0, 33 | "packets": 0 34 | } 35 | }, 36 | "lo": { 37 | "rx": { 38 | "bytes": 0, 39 | "drop": 0, 40 | "errors": 0, 41 | "overrun": 0, 42 | "packets": 0 43 | }, 44 | "tx": { 45 | "bytes": 0, 46 | "carrier": 0, 47 | "collisions": 0, 48 | "drop": 0, 49 | "errors": 0, 50 | "packets": 0, 51 | "queuelen": "1" 52 | } 53 | } 54 | } 55 | } 56 | }, 57 | "cpu": { 58 | "cores": 1, 59 | "real": 1, 60 | "total": 1 61 | }, 62 | "current_user": "fauxhai", 63 | "dmi": { 64 | "bios": { 65 | "address": "0xE8000", 66 | "all_records": [ 67 | { 68 | "Address": "0xE8000", 69 | "BIOS Revision": "1.0", 70 | "Characteristics": { 71 | "BIOS characteristics not supported": null, 72 | "Targeted content distribution is supported": null 73 | }, 74 | "ROM Size": "64 kB", 75 | "Release Date": "12/12/2017", 76 | "Runtime Size": "96 kB", 77 | "Vendor": "DigitalOcean", 78 | "Version": "20171212", 79 | "application_identifier": "BIOS Information", 80 | "record_id": "0x0000", 81 | "size": "0" 82 | } 83 | ], 84 | "bios_revision": "1.0", 85 | "release_date": "12/12/2017", 86 | "rom_size": "64 kB", 87 | "runtime_size": "96 kB", 88 | "vendor": "DigitalOcean", 89 | "version": "20171212" 90 | }, 91 | "chassis": { 92 | "all_records": [ 93 | { 94 | "Asset Tag": "Not Specified", 95 | "Boot-up State": "Safe", 96 | "Height": "Unspecified", 97 | "Lock": "Not Present", 98 | "Manufacturer": "Bochs", 99 | "Number Of Power Cords": "Unspecified", 100 | "OEM Information": "0x00000000", 101 | "Power Supply State": "Safe", 102 | "Security Status": "Unknown", 103 | "Serial Number": "Not Specified", 104 | "Thermal State": "Safe", 105 | "Type": "Other", 106 | "Version": "Not Specified", 107 | "application_identifier": "Chassis Information", 108 | "record_id": "0x0300", 109 | "size": "3" 110 | } 111 | ], 112 | "asset_tag": "Not Specified", 113 | "boot_up_state": "Safe", 114 | "height": "Unspecified", 115 | "lock": "Not Present", 116 | "manufacturer": "Bochs", 117 | "number_of_power_cords": "Unspecified", 118 | "oem_information": "0x00000000", 119 | "power_supply_state": "Safe", 120 | "security_status": "Unknown", 121 | "serial_number": "Not Specified", 122 | "thermal_state": "Safe", 123 | "type": "Other", 124 | "version": "Not Specified" 125 | }, 126 | "dmidecode_version": "3.2", 127 | "processor": { 128 | "all_records": [ 129 | { 130 | "Current Speed": "2000 MHz", 131 | "External Clock": "Unknown", 132 | "Family": "Other", 133 | "ID": "54 06 05 00 FF FB 8B 0F", 134 | "L1 Cache Handle": "Not Provided", 135 | "L2 Cache Handle": "Not Provided", 136 | "L3 Cache Handle": "Not Provided", 137 | "Manufacturer": "Bochs", 138 | "Max Speed": "2000 MHz", 139 | "Socket Designation": "CPU 1", 140 | "Status": "Populated, Enabled", 141 | "Type": "Central Processor", 142 | "Upgrade": "Other", 143 | "Version": "Not Specified", 144 | "Voltage": "Unknown", 145 | "application_identifier": "Processor Information", 146 | "record_id": "0x0401", 147 | "size": "4" 148 | } 149 | ], 150 | "current_speed": "2000 MHz", 151 | "external_clock": "Unknown", 152 | "family": "Other", 153 | "id": "54 06 05 00 FF FB 8B 0F", 154 | "l1_cache_handle": "Not Provided", 155 | "l2_cache_handle": "Not Provided", 156 | "l3_cache_handle": "Not Provided", 157 | "manufacturer": "Bochs", 158 | "max_speed": "2000 MHz", 159 | "socket_designation": "CPU 1", 160 | "status": "Populated, Enabled", 161 | "type": "Central Processor", 162 | "upgrade": "Other", 163 | "version": "Not Specified", 164 | "voltage": "Unknown" 165 | }, 166 | "smbios_version": "2.4", 167 | "structures": { 168 | "count": "10", 169 | "size": "322" 170 | }, 171 | "system": { 172 | "all_records": [ 173 | { 174 | "Family": "DigitalOcean_Droplet", 175 | "Manufacturer": "DigitalOcean", 176 | "Product Name": "Droplet", 177 | "SKU Number": "Not Specified", 178 | "Serial Number": "174595272", 179 | "UUID": "20cb3805-f986-40f3-8112-632eeb6bc03d", 180 | "Version": "20171212", 181 | "Wake-up Type": "Power Switch", 182 | "application_identifier": "System Information", 183 | "record_id": "0x0100", 184 | "size": "1" 185 | } 186 | ], 187 | "family": "DigitalOcean_Droplet", 188 | "manufacturer": "DigitalOcean", 189 | "product_name": "Droplet", 190 | "serial_number": "174595272", 191 | "sku_number": "Not Specified", 192 | "uuid": "20cb3805-f986-40f3-8112-632eeb6bc03d", 193 | "version": "20171212", 194 | "wake_up_type": "Power Switch" 195 | } 196 | }, 197 | "domain": "local", 198 | "filesystem": { 199 | "/dev/vtbd1": { 200 | "fs_type": "cd9660", 201 | "inodes_available": "0", 202 | "inodes_percent_used": "100", 203 | "inodes_used": "0", 204 | "kb_available": "0", 205 | "kb_size": "900", 206 | "kb_used": "900", 207 | "mount": "/var/lib/cloud/seed/config_drive", 208 | "mount_options": [ 209 | "local", 210 | "read-only" 211 | ], 212 | "percent_used": "100%", 213 | "total_inodes": "0" 214 | }, 215 | "devfs": { 216 | "fs_type": "devfs", 217 | "inodes_available": "0", 218 | "inodes_percent_used": "100", 219 | "inodes_used": "0", 220 | "kb_available": "0", 221 | "kb_size": "2", 222 | "kb_used": "2", 223 | "mount": "/dev", 224 | "mount_options": [ 225 | "local", 226 | "multilabel" 227 | ], 228 | "percent_used": "100%", 229 | "total_inodes": "0" 230 | }, 231 | "fdescfs": { 232 | "inodes_available": "57750", 233 | "inodes_percent_used": "0", 234 | "inodes_used": "4", 235 | "kb_available": "0", 236 | "kb_size": "2", 237 | "kb_used": "2", 238 | "mount": "/dev/fd", 239 | "percent_used": "100%", 240 | "total_inodes": "57754" 241 | }, 242 | "zroot/ROOT/default": { 243 | "fs_type": "zfs", 244 | "inodes_available": "89092392", 245 | "inodes_percent_used": "0", 246 | "inodes_used": "153615", 247 | "kb_available": "89092392", 248 | "kb_size": "96315504", 249 | "kb_used": "7223112", 250 | "mount": "/", 251 | "mount_options": [ 252 | "local", 253 | "noatime", 254 | "nfsv4acls" 255 | ], 256 | "percent_used": "7%", 257 | "total_inodes": "89246007" 258 | }, 259 | "zroot/tmp": { 260 | "fs_type": "zfs", 261 | "inodes_available": "89092392", 262 | "inodes_percent_used": "0", 263 | "inodes_used": "12", 264 | "kb_available": "89092392", 265 | "kb_size": "89092616", 266 | "kb_used": "224", 267 | "mount": "/tmp", 268 | "mount_options": [ 269 | "local", 270 | "noatime", 271 | "nosuid", 272 | "nfsv4acls" 273 | ], 274 | "percent_used": "0%", 275 | "total_inodes": "89092404" 276 | }, 277 | "zroot/usr/home": { 278 | "fs_type": "zfs", 279 | "inodes_available": "89092392", 280 | "inodes_percent_used": "0", 281 | "inodes_used": "17", 282 | "kb_available": "89092392", 283 | "kb_size": "89092648", 284 | "kb_used": "256", 285 | "mount": "/usr/home", 286 | "mount_options": [ 287 | "local", 288 | "noatime", 289 | "nfsv4acls" 290 | ], 291 | "percent_used": "0%", 292 | "total_inodes": "89092409" 293 | }, 294 | "zroot/usr/ports": { 295 | "fs_type": "zfs", 296 | "inodes_available": "89092392", 297 | "inodes_percent_used": "0", 298 | "inodes_used": "7", 299 | "kb_available": "89092392", 300 | "kb_size": "89092568", 301 | "kb_used": "176", 302 | "mount": "/usr/ports", 303 | "mount_options": [ 304 | "local", 305 | "noatime", 306 | "nosuid", 307 | "nfsv4acls" 308 | ], 309 | "percent_used": "0%", 310 | "total_inodes": "89092399" 311 | }, 312 | "zroot/usr/src": { 313 | "fs_type": "zfs", 314 | "inodes_available": "89092392", 315 | "inodes_percent_used": "0", 316 | "inodes_used": "7", 317 | "kb_available": "89092392", 318 | "kb_size": "89092568", 319 | "kb_used": "176", 320 | "mount": "/usr/src", 321 | "mount_options": [ 322 | "local", 323 | "noatime", 324 | "noexec", 325 | "nosuid", 326 | "nfsv4acls" 327 | ], 328 | "percent_used": "0%", 329 | "total_inodes": "89092399" 330 | }, 331 | "zroot/var/audit": { 332 | "fs_type": "zfs", 333 | "inodes_available": "89092392", 334 | "inodes_percent_used": "0", 335 | "inodes_used": "7", 336 | "kb_available": "89092392", 337 | "kb_size": "89092568", 338 | "kb_used": "176", 339 | "mount": "/var/audit", 340 | "mount_options": [ 341 | "local", 342 | "noatime", 343 | "noexec", 344 | "nosuid", 345 | "nfsv4acls" 346 | ], 347 | "percent_used": "0%", 348 | "total_inodes": "89092399" 349 | }, 350 | "zroot/var/crash": { 351 | "fs_type": "zfs", 352 | "inodes_available": "89092392", 353 | "inodes_percent_used": "0", 354 | "inodes_used": "7", 355 | "kb_available": "89092392", 356 | "kb_size": "89092568", 357 | "kb_used": "176", 358 | "mount": "/var/crash", 359 | "mount_options": [ 360 | "local", 361 | "noatime", 362 | "noexec", 363 | "nosuid", 364 | "nfsv4acls" 365 | ], 366 | "percent_used": "0%", 367 | "total_inodes": "89092399" 368 | }, 369 | "zroot/var/log": { 370 | "fs_type": "zfs", 371 | "inodes_available": "89092392", 372 | "inodes_percent_used": "0", 373 | "inodes_used": "22", 374 | "kb_available": "89092392", 375 | "kb_size": "89092632", 376 | "kb_used": "240", 377 | "mount": "/var/log", 378 | "mount_options": [ 379 | "local", 380 | "noatime", 381 | "noexec", 382 | "nosuid", 383 | "nfsv4acls" 384 | ], 385 | "percent_used": "0%", 386 | "total_inodes": "89092414" 387 | }, 388 | "zroot/var/mail": { 389 | "fs_type": "zfs", 390 | "inodes_available": "89092392", 391 | "inodes_percent_used": "0", 392 | "inodes_used": "8", 393 | "kb_available": "89092392", 394 | "kb_size": "89092568", 395 | "kb_used": "176", 396 | "mount": "/var/mail", 397 | "mount_options": [ 398 | "local", 399 | "noexec", 400 | "nosuid", 401 | "nfsv4acls" 402 | ], 403 | "percent_used": "0%", 404 | "total_inodes": "89092400" 405 | }, 406 | "zroot/var/tmp": { 407 | "fs_type": "zfs", 408 | "inodes_available": "89092392", 409 | "inodes_percent_used": "0", 410 | "inodes_used": "8", 411 | "kb_available": "89092392", 412 | "kb_size": "89092568", 413 | "kb_used": "176", 414 | "mount": "/var/tmp", 415 | "mount_options": [ 416 | "local", 417 | "noatime", 418 | "nosuid", 419 | "nfsv4acls" 420 | ], 421 | "percent_used": "0%", 422 | "total_inodes": "89092400" 423 | } 424 | }, 425 | "fqdn": "fauxhai.local", 426 | "hostname": "Fauxhai", 427 | "idle": "30 days 15 hours 07 minutes 30 seconds", 428 | "idletime_seconds": 2646450, 429 | "ipaddress": "10.0.0.2", 430 | "kernel": { 431 | "ident": "GENERIC", 432 | "machine": "amd64", 433 | "modules": { 434 | "aesni": { 435 | "refcount": "1", 436 | "size": "e1d8" 437 | }, 438 | "cd9660_iconv": { 439 | "refcount": "1", 440 | "size": "11b0" 441 | }, 442 | "fdescfs": { 443 | "refcount": "1", 444 | "size": "1aa0" 445 | }, 446 | "intpm": { 447 | "refcount": "1", 448 | "size": "2668" 449 | }, 450 | "kernel": { 451 | "refcount": "30", 452 | "size": "2448ef8" 453 | }, 454 | "libiconv": { 455 | "refcount": "2", 456 | "size": "8a88" 457 | }, 458 | "opensolaris": { 459 | "refcount": "2", 460 | "size": "a5b8" 461 | }, 462 | "smbus": { 463 | "refcount": "1", 464 | "size": "b50" 465 | }, 466 | "virtio_console": { 467 | "refcount": "1", 468 | "size": "6a70" 469 | }, 470 | "zfs": { 471 | "refcount": "1", 472 | "size": "3a99a8" 473 | } 474 | }, 475 | "name": "FreeBSD", 476 | "os": "FreeBSD", 477 | "processor": "amd64", 478 | "release": "12.1-RELEASE-p1", 479 | "securelevel": [ 480 | "kern.securelevel: -1" 481 | ], 482 | "version": "FreeBSD 12.1-RELEASE-p1 GENERIC " 483 | }, 484 | "keys": { 485 | "ssh": { 486 | "host_dsa_public": "ssh-dss AAAAB3NzaC1kc3MAAACBAJFo9BLAw4WKEs5hgipk5m423FzBsDXCZSMcC9ca/om/1VYzMqImixGe3uICDzNFUWxFoLJTQAOccyzo6MXZiQqwWJDLFi5qOSr6w2XcMyE+zd4wOyMoDiVM5fizmG8K3FzrqvGjwBcHcBdOQnavSijoj38DN25J9zhrid5BY4WlAAAAFQDxXrCyG52XCzn3FV4ej38wJBkomQAAAIBovGPJ4mP2P6BK8lHl0PPbktwQbWlpJ13oz6REJFDVcUi7vV26bX/BjQX+ohzZQzljdz1SpUbPc/8nuA4darYkVh91eBi307EN8IdxRHj2eBgp/ZG4yshIebG3WHrwJD/xUjjZ1MRfyDT1ermVi4LvjjPgWDxLZnPpMaR6S1nzgQAAAIEAj0Vd6DCWslvlsZ8+N53HWsqPi3gnx35JoLPz9Z2epkKIKqmEHav+93G3hdfztVa4I4t3phoPniQchYryF5+RNg8hqxKzjNtrIqUYCeuf2NJrksNsH7OZygPHZpqt4kTuwAGZxjxEGfAI0y8DhkU2ntp2LnzRnWH106BQBCmcXwo= fauxhai.local", 487 | "host_rsa_public": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCtLCeqtqr/HbnORckw1ukdLhpfGoOPFi5/esKEokzTqq1gsgQ2V8emmyjfq1i6XXfRtSBxkdlHv/GWdP5wBTuE2G85MzBkVSQPvmwQN8lX/JMPEEtKXkeOo0o92/PiSmvY4eRsdF0mw40Uvg7jtE3f3fxj497kzh5fKtkrHnF4x9gXCbVdr3FqXJfggR5IJwAxToerbK7x/uRS+7YuZI9Pip3tt14nv9ezwXcuGb/tvjWOZINiFl8izVIFKi7sxfTX09p4NgamxRS7TD2Yd0jT8nEoF9UZTsgXcJ1kDSx7N7NxFfNfP6rCdOGRRz4gUhXtsUjG/XkxPeCwZ7A9VnOD fauxhai.local" 488 | } 489 | }, 490 | "languages": { 491 | "powershell": null, 492 | "ruby": { 493 | "bin_dir": "/usr/local/bin", 494 | "gem_bin": "/usr/local/bin/gem", 495 | "gems_dir": "/usr/local/gems", 496 | "host": "amd64-portbld-freebsd12", 497 | "host_cpu": "amd64", 498 | "host_os": "freebsd12", 499 | "host_vendor": "portbld", 500 | "platform": "amd64-freebsd12", 501 | "release_date": "2019-10-01", 502 | "ruby_bin": "/usr/local/bin/ruby", 503 | "target": "amd64-portbld-freebsd12", 504 | "target_cpu": "amd64", 505 | "target_os": "freebsd12", 506 | "target_vendor": "portbld", 507 | "version": "2.6.5" 508 | } 509 | }, 510 | "macaddress": "11:11:11:11:11:11", 511 | "machinename": "Fauxhai", 512 | "memory": { 513 | "total": "1048576kB" 514 | }, 515 | "network": { 516 | "default_gateway": "10.0.0.1", 517 | "default_interface": "em0", 518 | "interfaces": { 519 | "em0": { 520 | "addresses": { 521 | "10.0.0.2": { 522 | "broadcast": "10.0.0.255", 523 | "family": "inet", 524 | "ip_scope": "RFC1918 PRIVATE", 525 | "netmask": "255.255.255.0", 526 | "prefixlen": "24", 527 | "scope": "Global" 528 | }, 529 | "11:11:11:11:11:11": { 530 | "family": "lladdr" 531 | }, 532 | "fe80::11:1111:1111:1111": { 533 | "family": "inet6", 534 | "ip_scope": "LINK LOCAL UNICAST", 535 | "prefixlen": "64", 536 | "scope": "Link", 537 | "tags": [ 538 | ] 539 | } 540 | }, 541 | "arp": { 542 | "10.0.0.1": "fe:ff:ff:ff:ff:ff" 543 | }, 544 | "encapsulation": "Ethernet", 545 | "flags": [ 546 | "BROADCAST", 547 | "MULTICAST", 548 | "UP", 549 | "LOWER_UP" 550 | ], 551 | "mtu": "1500", 552 | "number": "0", 553 | "ring_params": { 554 | }, 555 | "routes": [ 556 | { 557 | "destination": "default", 558 | "family": "inet", 559 | "via": "10.0.0.1" 560 | }, 561 | { 562 | "destination": "10.0.0.0/24", 563 | "family": "inet", 564 | "proto": "kernel", 565 | "scope": "link", 566 | "src": "10.0.0.2" 567 | }, 568 | { 569 | "destination": "fe80::/64", 570 | "family": "inet6", 571 | "metric": "256", 572 | "proto": "kernel" 573 | } 574 | ], 575 | "state": "up", 576 | "type": "em" 577 | }, 578 | "lo": { 579 | "addresses": { 580 | "127.0.0.1": { 581 | "family": "inet", 582 | "ip_scope": "LOOPBACK", 583 | "netmask": "255.0.0.0", 584 | "prefixlen": "8", 585 | "scope": "Node" 586 | }, 587 | "::1": { 588 | "family": "inet6", 589 | "ip_scope": "LINK LOCAL LOOPBACK", 590 | "prefixlen": "128", 591 | "scope": "Node", 592 | "tags": [ 593 | ] 594 | } 595 | }, 596 | "encapsulation": "Loopback", 597 | "flags": [ 598 | "LOOPBACK", 599 | "UP", 600 | "LOWER_UP" 601 | ], 602 | "mtu": "65536", 603 | "state": "unknown" 604 | } 605 | } 606 | }, 607 | "ohai_time": 1578408178.2818284, 608 | "os": "freebsd", 609 | "os_version": "1201000", 610 | "packages": { 611 | "ca_root_nss": { 612 | "version": "3.47.1" 613 | }, 614 | "curl": { 615 | "version": "7.66.0" 616 | }, 617 | "dmidecode": { 618 | "version": "3.2" 619 | }, 620 | "e2fsprogs": { 621 | "version": "1.45.3_2" 622 | }, 623 | "e2fsprogs-libblkid": { 624 | "version": "1.45.3" 625 | }, 626 | "e2fsprogs-libss": { 627 | "version": "1.45.3" 628 | }, 629 | "e2fsprogs-libuuid": { 630 | "version": "1.45.3" 631 | }, 632 | "gettext-runtime": { 633 | "version": "0.20.1" 634 | }, 635 | "indexinfo": { 636 | "version": "0.3.1" 637 | }, 638 | "jq": { 639 | "version": "1.6" 640 | }, 641 | "libedit": { 642 | "version": "3.1.20191211,1" 643 | }, 644 | "libffi": { 645 | "version": "3.2.1_3" 646 | }, 647 | "libiconv": { 648 | "version": "1.14_11" 649 | }, 650 | "libidn2": { 651 | "version": "2.2.0" 652 | }, 653 | "libnghttp2": { 654 | "version": "1.39.2" 655 | }, 656 | "libunistring": { 657 | "version": "0.9.10_1" 658 | }, 659 | "libunwind": { 660 | "version": "20170615" 661 | }, 662 | "libyaml": { 663 | "version": "0.2.2" 664 | }, 665 | "oniguruma": { 666 | "version": "6.9.3" 667 | }, 668 | "pkg": { 669 | "version": "1.12.0" 670 | }, 671 | "py27-Babel": { 672 | "version": "2.7.0" 673 | }, 674 | "py27-Jinja2": { 675 | "version": "2.10.1" 676 | }, 677 | "py27-MarkupSafe": { 678 | "version": "1.1.1" 679 | }, 680 | "py27-asn1crypto": { 681 | "version": "0.24.0" 682 | }, 683 | "py27-attrs": { 684 | "version": "19.1.0" 685 | }, 686 | "py27-blinker": { 687 | "version": "1.4" 688 | }, 689 | "py27-boto": { 690 | "version": "2.49.0_1" 691 | }, 692 | "py27-certifi": { 693 | "version": "2019.6.16" 694 | }, 695 | "py27-cffi": { 696 | "version": "1.12.3" 697 | }, 698 | "py27-chardet": { 699 | "version": "3.0.4_1" 700 | }, 701 | "py27-cheetah": { 702 | "version": "2.4.4_1" 703 | }, 704 | "py27-cloud-init": { 705 | "version": "19.2" 706 | }, 707 | "py27-configobj": { 708 | "version": "5.0.6_1" 709 | }, 710 | "py27-cryptography": { 711 | "version": "2.6.1" 712 | }, 713 | "py27-enum34": { 714 | "version": "1.1.6" 715 | }, 716 | "py27-functools32": { 717 | "version": "3.2.3_1" 718 | }, 719 | "py27-idna": { 720 | "version": "2.8" 721 | }, 722 | "py27-ipaddress": { 723 | "version": "1.0.22" 724 | }, 725 | "py27-jsonpatch": { 726 | "version": "1.21_1" 727 | }, 728 | "py27-jsonpointer": { 729 | "version": "1.9_2" 730 | }, 731 | "py27-jsonschema": { 732 | "version": "3.0.2" 733 | }, 734 | "py27-markdown": { 735 | "version": "2.6.11_1" 736 | }, 737 | "py27-oauthlib": { 738 | "version": "1.1.2" 739 | }, 740 | "py27-openssl": { 741 | "version": "19.0.0" 742 | }, 743 | "py27-pycparser": { 744 | "version": "2.19" 745 | }, 746 | "py27-pyjwt": { 747 | "version": "1.4.0_1" 748 | }, 749 | "py27-pyrsistent": { 750 | "version": "0.14.11" 751 | }, 752 | "py27-pysocks": { 753 | "version": "1.7.1" 754 | }, 755 | "py27-pytz": { 756 | "version": "2019.3,1" 757 | }, 758 | "py27-requests": { 759 | "version": "2.22.0" 760 | }, 761 | "py27-serial": { 762 | "version": "3.4_1" 763 | }, 764 | "py27-setuptools": { 765 | "version": "41.2.0" 766 | }, 767 | "py27-six": { 768 | "version": "1.12.0" 769 | }, 770 | "py27-urllib3": { 771 | "version": "1.22,1" 772 | }, 773 | "py27-yaml": { 774 | "version": "5.1" 775 | }, 776 | "py36-Babel": { 777 | "version": "2.7.0" 778 | }, 779 | "py36-Jinja2": { 780 | "version": "2.10.1" 781 | }, 782 | "py36-MarkupSafe": { 783 | "version": "1.1.1" 784 | }, 785 | "py36-asn1crypto": { 786 | "version": "0.24.0" 787 | }, 788 | "py36-attrs": { 789 | "version": "19.1.0" 790 | }, 791 | "py36-blinker": { 792 | "version": "1.4" 793 | }, 794 | "py36-boto": { 795 | "version": "2.49.0_1" 796 | }, 797 | "py36-certifi": { 798 | "version": "2019.6.16" 799 | }, 800 | "py36-cffi": { 801 | "version": "1.12.3" 802 | }, 803 | "py36-chardet": { 804 | "version": "3.0.4_1" 805 | }, 806 | "py36-configobj": { 807 | "version": "5.0.6_1" 808 | }, 809 | "py36-cryptography": { 810 | "version": "2.6.1" 811 | }, 812 | "py36-idna": { 813 | "version": "2.8" 814 | }, 815 | "py36-jsonpatch": { 816 | "version": "1.21_1" 817 | }, 818 | "py36-jsonpointer": { 819 | "version": "1.9_2" 820 | }, 821 | "py36-jsonschema": { 822 | "version": "3.0.2" 823 | }, 824 | "py36-oauthlib": { 825 | "version": "1.1.2" 826 | }, 827 | "py36-openssl": { 828 | "version": "19.0.0" 829 | }, 830 | "py36-pycparser": { 831 | "version": "2.19" 832 | }, 833 | "py36-pyjwt": { 834 | "version": "1.4.0_1" 835 | }, 836 | "py36-pyrsistent": { 837 | "version": "0.14.11" 838 | }, 839 | "py36-pysocks": { 840 | "version": "1.7.1" 841 | }, 842 | "py36-pytz": { 843 | "version": "2019.3,1" 844 | }, 845 | "py36-requests": { 846 | "version": "2.22.0" 847 | }, 848 | "py36-serial": { 849 | "version": "3.4_1" 850 | }, 851 | "py36-setuptools": { 852 | "version": "41.2.0" 853 | }, 854 | "py36-six": { 855 | "version": "1.12.0" 856 | }, 857 | "py36-urllib3": { 858 | "version": "1.22,1" 859 | }, 860 | "py36-yaml": { 861 | "version": "5.1" 862 | }, 863 | "python27": { 864 | "version": "2.7.16_1" 865 | }, 866 | "python36": { 867 | "version": "3.6.9" 868 | }, 869 | "readline": { 870 | "version": "8.0.0" 871 | }, 872 | "rsync": { 873 | "version": "3.1.3_1" 874 | }, 875 | "ruby": { 876 | "version": "2.6.5,1" 877 | }, 878 | "ruby26-gems": { 879 | "version": "3.0.6" 880 | }, 881 | "rubygem-irb": { 882 | "version": "1.0.0" 883 | }, 884 | "sudo": { 885 | "version": "1.8.28" 886 | }, 887 | "vim-console": { 888 | "version": "8.1.1954" 889 | }, 890 | "wget": { 891 | "version": "1.20.3" 892 | } 893 | }, 894 | "platform": "freebsd", 895 | "platform_family": "freebsd", 896 | "platform_version": "12.1-RELEASE-p1", 897 | "root_group": "wheel", 898 | "shard_seed": 45875297, 899 | "shells": [ 900 | "/bin/sh", 901 | "/bin/csh", 902 | "/bin/tcsh" 903 | ], 904 | "time": { 905 | "timezone": "GMT" 906 | }, 907 | "uptime": "30 days 15 hours 07 minutes 30 seconds", 908 | "uptime_seconds": 2646450, 909 | "virtualization": { 910 | "systems": { 911 | } 912 | } 913 | } --------------------------------------------------------------------------------