Class: Chef::Knife::ZeroDiagnose

Inherits:
Chef::Knife show all
Includes:
ZeroBase
Defined in:
lib/chef/knife/zero_diagnose.rb

Instance Method Summary collapse

Methods included from ZeroBase

included

Constructor Details

#initialize(argv = []) ⇒ ZeroDiagnose

Returns a new instance of ZeroDiagnose.



19
20
21
22
23
# File 'lib/chef/knife/zero_diagnose.rb', line 19

def initialize(argv = [])
  super
  @bootstrap = Chef::Knife::ZeroBootstrap.new
  @converge = Chef::Knife::ZeroConverge.new
end

Instance Method Details

#runObject

rubocop:disable Metrics/AbcSize



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/chef/knife/zero_diagnose.rb', line 25

def run # rubocop:disable Metrics/AbcSize
  ui.msg 'Chef::Config'
  ui.msg '===================='
  ui.msg Chef::Config.configuration.to_yaml
  ui.msg ''

  ui.msg 'Knife::Config'
  ui.msg '===================='
  ui.msg config.to_yaml
  ui.msg ''

  ui.msg 'Zero Bootstrap Config'
  ui.msg '===================='
  @bootstrap = Chef::Knife::ZeroBootstrap.new
  @bootstrap.merge_configs
  ui.msg @bootstrap.config.to_yaml
  ui.msg ''

  ui.msg 'Zero Converge Config'
  ui.msg '===================='
  @converge.merge_configs
  ui.msg @converge.config.to_yaml
end