Class: ElasticInfra::DirectorBootstrapWindows

Inherits:
Chef::Knife::BootstrapWindowsWinrm
  • Object
show all
Defined in:
lib/chef/knife/director_bootstrap_windows.rb

Overview

knife bootstrap wrapper for Windows

Instance Method Summary collapse

Instance Method Details

#bootstrap_templateObject



36
37
38
39
# File 'lib/chef/knife/director_bootstrap_windows.rb', line 36

def bootstrap_template
  return nil if config[:bootstrap_template] == '__no_template__'
  config[:bootstrap_template] || 'windows'
end

#runObject



24
25
26
27
28
29
30
31
32
33
34
# File 'lib/chef/knife/director_bootstrap_windows.rb', line 24

def run
  unless config[:environment]
    puts 'You must specify environment other than _default'
    show_usage
    exit 1
  end
  target_hostname = name_args[0].gsub(/.*@/, '')
  config[:chef_node_name] ||= target_hostname
  config[:bootstrap_template] = bootstrap_template
  super
end